Refactor move tests from ebean-core to ebean-test

This commit is contained in:
rbygrave
2021-09-08 22:49:23 +12:00
parent 0b00a14fd3
commit eab56d323b
1650 changed files with 185 additions and 147 deletions
@@ -0,0 +1,38 @@
package org.tests.unitinternal;
import io.ebean.BaseTestCase;
import io.ebean.DB;
import io.ebean.bean.BeanCollection;
import org.tests.model.basic.EVanillaCollection;
import org.tests.model.basic.EVanillaCollectionDetail;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
public class TestVanillaCollectionSet extends BaseTestCase {
@Test
public void test() {
EVanillaCollection c = new EVanillaCollection();
DB.save(c);
EVanillaCollection c2 = DB.find(EVanillaCollection.class, c.getId());
assertNotNull(c2);
List<EVanillaCollectionDetail> details = c2.getDetails();
assertNotNull(details);
assertTrue(details instanceof BeanCollection<?>);
BeanCollection<?> bc = (BeanCollection<?>) details;
assertFalse(bc.isPopulated());
assertNotNull(bc.getOwnerBean());
assertNotNull(bc.getPropertyName());
}
}