Search in sources :

Example 1 with SubclassA

use of org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassA 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());
}
Also used : SubclassB(org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassB) SubclassA(org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassA) TestMdsEntity(org.motechproject.mds.test.domain.TestMdsEntity) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TestMdsEntity (org.motechproject.mds.test.domain.TestMdsEntity)1 SubclassA (org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassA)1 SubclassB (org.motechproject.mds.test.domain.instancelifecyclelistener.SubclassB)1