Refactor properties bootup, remove GlobalProperties and allow ServerConfig.loadFromProperties()

This commit is contained in:
rbygrave
2014-11-30 17:08:02 +13:00
parent fe65a0ccb9
commit 370267ab6f
105 changed files with 3772 additions and 3963 deletions
@@ -1,21 +1,18 @@
package com.avaje.tests.basic;
import javax.persistence.PersistenceException;
import org.junit.Assert;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.config.GlobalProperties;
import com.avaje.tests.model.basic.Order;
import org.junit.Assert;
import org.junit.Test;
import javax.persistence.PersistenceException;
public class TestErrorBindLog extends BaseTestCase {
@Test
public void test() {
GlobalProperties.put("somethingelse", "d:/junk2");
try {
Ebean.find(Order.class).where().gt("id", "JUNK").findList();
@@ -73,8 +73,8 @@ public class TestLimitQuery extends BaseTestCase {
boolean hasOffset = sql.indexOf("offset") > -1;
if (h2Db) {
Assert.assertTrue(hasLimit);
Assert.assertFalse(hasOffset);
Assert.assertTrue(sql, hasLimit);
Assert.assertFalse(sql, hasOffset);
}
}
@@ -1,18 +1,14 @@
package com.avaje.tests.basic.type;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.config.GlobalProperties;
import org.junit.Test;
public class TestTransientMap extends BaseTestCase {
@Test
public void testMe() {
GlobalProperties.put("classes", BSimpleWithGen.class.toString());
BSimpleWithGen b = new BSimpleWithGen();
b.setName("blah");