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
@@ -4,6 +4,7 @@ import io.ebean.BaseTestCase;
import io.ebean.Ebean;
import org.tests.model.basic.Contact;
import org.tests.model.basic.Customer;
import org.tests.model.basic.ResetBasicData;
import org.junit.Assert;
import org.junit.Test;
@@ -14,6 +15,8 @@ public class TestBasicNavOnEmpty extends BaseTestCase {
@Test
public void test() {
ResetBasicData.reset();
Customer c = new Customer();
c.setName("HelloRob");
@@ -23,6 +26,9 @@ public class TestBasicNavOnEmpty extends BaseTestCase {
List<Contact> contacts = c.getContacts();
Assert.assertEquals(0, contacts.size());
// cleanup
Ebean.delete(c);
}
}