Fixed tests that modify BasicData (#1530)

This commit is contained in:
Roland Praml
2018-11-03 16:38:26 +13:00
committed by Rob Bygrave
parent 662ffdd070
commit 61eedb4e9a
17 changed files with 92 additions and 10 deletions
@@ -33,5 +33,8 @@ public class TestLazyLoadEmptyOneToMany extends BaseTestCase {
int sz = contacts.size();
Assert.assertTrue(sz == 0);
// cleanup
Ebean.delete(c1);
}
}
@@ -4,6 +4,7 @@ import io.ebean.BaseTestCase;
import io.ebean.BeanState;
import io.ebean.Ebean;
import org.tests.model.basic.Customer;
import org.tests.model.basic.ResetBasicData;
import org.junit.Assert;
import org.junit.Test;
@@ -12,6 +13,8 @@ public class TestTransient extends BaseTestCase {
@Test
public void testTransient() {
ResetBasicData.reset();
Customer cnew = new Customer();
cnew.setName("testTrans");
@@ -58,5 +61,8 @@ public class TestTransient extends BaseTestCase {
int rows = Ebean.createUpdate(Customer.class, updateStmt).set("id", custId).execute();
Assert.assertTrue("changed name back", 1 == rows);
// cleanup
Ebean.delete(Customer.class, custId);
}
}