mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fixed tests that modify BasicData (#1530)
This commit is contained in:
committed by
Rob Bygrave
parent
662ffdd070
commit
61eedb4e9a
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user