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,36 @@
package org.tests.basic;
import io.ebean.BaseTestCase;
import io.ebean.DB;
import org.tests.model.basic.TMapSuperEntity;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class TestMappedSuper extends BaseTestCase {
@Test
public void test() {
TMapSuperEntity e = new TMapSuperEntity();
e.setName("babana");
DB.save(e);
// select includes a transient property
TMapSuperEntity e2 = DB.find(TMapSuperEntity.class)
.where().idEq(e.getId())
.select("id, name, myint, someObject, bananan")
.findOne();
assertNotNull(e2);
TMapSuperEntity eSaveDelete = new TMapSuperEntity();
eSaveDelete.setName("babana");
DB.save(eSaveDelete);
DB.delete(eSaveDelete);
}
}