use of org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassB in project motech by motech.
the class MdsDdeBundleIT method testJdoListeners.
@Test
public void testJdoListeners() throws Exception {
getLogger().info("Test JdoListeners");
testMdsEntityService.create(new TestMdsEntity("TestChangeName"));
List<TestMdsEntity> entities = testMdsEntityService.retrieveAll();
assertEquals(1, entities.size());
assertEquals("NameWasChanged", entities.get(0).getSomeString());
subclassADataService.create(new SubclassA());
subclassBDataService.create(new SubclassB());
List<SubclassA> subclassesA = subclassADataService.retrieveAll();
List<SubclassB> subclassesB = subclassBDataService.retrieveAll();
assertEquals(1, subclassesA.size());
assertEquals(1, subclassesB.size());
assertEquals("StringWasChanged", subclassesA.get(0).getSuperClassString());
assertEquals("StringWasChanged", subclassesB.get(0).getSuperClassString());
}
Aggregations