mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
38 lines
903 B
Java
38 lines
903 B
Java
package org.tests.unitinternal;
|
|
|
|
import io.ebean.xtest.BaseTestCase;
|
|
import io.ebean.DB;
|
|
import io.ebean.bean.BeanCollection;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.tests.model.basic.ENullCollection;
|
|
import org.tests.model.basic.ENullCollectionDetail;
|
|
|
|
import java.util.List;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
public class TestNullCollectionSet extends BaseTestCase {
|
|
|
|
@Test
|
|
public void test() {
|
|
ENullCollection c = new ENullCollection();
|
|
|
|
DB.save(c);
|
|
|
|
ENullCollection c2 = DB.find(ENullCollection.class, c.getId());
|
|
|
|
assertNotNull(c2);
|
|
|
|
List<ENullCollectionDetail> details = c2.getDetails();
|
|
assertNotNull(details);
|
|
|
|
assertTrue(details instanceof BeanCollection<?>);
|
|
|
|
BeanCollection<?> bc = (BeanCollection<?>) details;
|
|
assertFalse(bc.isPopulated());
|
|
assertNotNull(bc.getOwnerBean());
|
|
assertNotNull(bc.getPropertyName());
|
|
}
|
|
|
|
}
|