@Test @DataSet("/test/pack/data/greenvine/entity/dbo/StandFindDataSet.xml") public void testLoadStandByIdentity() throws Exception { Stand result = standDao.loadStand(StandTestUtils.getDefaultIdentity()); Assert.assertNotNull(result); Assert.assertEquals("s", result.getDescription()); }
@Test @DataSet("/test/pack/data/greenvine/entity/dbo/StandBeforeUpdateDataSet.xml") @ExpectedDataSet("/test/pack/data/greenvine/entity/dbo/StandAfterUpdateDataSet.xml") public void testUpdateStand() throws Exception { // Load entity and modify Stand update = standDao.loadStand(StandTestUtils.getDefaultIdentity()); update.setDescription("t"); // Update entity standDao.updateStand(update); }
@Test @DataSet("/test/pack/data/greenvine/entity/dbo/StandBeforeCreateDataSet.xml") @ExpectedDataSet("/test/pack/data/greenvine/entity/dbo/StandAfterCreateDataSet.xml") public void testCreateStand() throws Exception { // Create new entity Stand create = new Stand(); // Set identity create.setStandId(Integer.valueOf(1)); // Populate simple properties create.setDescription("s"); // Create in database standDao.createStand(create); }