mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor properties bootup, remove GlobalProperties and allow ServerConfig.loadFromProperties()
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
import java.util.Date;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
@@ -34,7 +34,7 @@ public class EBasic {
|
||||
|
||||
String description;
|
||||
|
||||
Date someDate;
|
||||
Timestamp someDate;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
@@ -68,11 +68,11 @@ public class EBasic {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Date getSomeDate() {
|
||||
public Timestamp getSomeDate() {
|
||||
return someDate;
|
||||
}
|
||||
|
||||
public void setSomeDate(Date someDate) {
|
||||
public void setSomeDate(Timestamp someDate) {
|
||||
this.someDate = someDate;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
package com.avaje.tests.model.onetoone;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import org.avaje.ebeantest.LoggedSqlCollector;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.config.GlobalProperties;
|
||||
import java.util.List;
|
||||
|
||||
public class TestOneToOneOptionalRelationship extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
GlobalProperties.put("ebean.search.packages", "com.avaje.tests.model.onetoone");
|
||||
|
||||
|
||||
Account account = new Account();
|
||||
account.setName("AC234");
|
||||
account.save();
|
||||
@@ -42,8 +38,6 @@ public class TestOneToOneOptionalRelationship extends BaseTestCase {
|
||||
@Test
|
||||
public void testWithUser() {
|
||||
|
||||
GlobalProperties.put("ebean.search.packages", "com.avaje.tests.model.onetoone");
|
||||
|
||||
Account account = new Account();
|
||||
account.setName("AC678");
|
||||
account.save();
|
||||
@@ -81,8 +75,6 @@ public class TestOneToOneOptionalRelationship extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void testWithUserFetch() {
|
||||
|
||||
GlobalProperties.put("ebean.search.packages", "com.avaje.tests.model.onetoone");
|
||||
|
||||
Account account = new Account();
|
||||
account.setName("AC786");
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
package com.avaje.tests.model.pview;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.ebean.config.GlobalProperties;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class TestPview extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
GlobalProperties.put("ebean.search.packages", "com.avaje.tests.model.odd");
|
||||
|
||||
|
||||
Wview wview = Ebean.getReference(Wview.class, UUID.randomUUID());
|
||||
|
||||
Query<Paggview> query = Ebean.find(Paggview.class);
|
||||
|
||||
Reference in New Issue
Block a user