mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor move tests from ebean-core to ebean-test
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user