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,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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user