@Test public void modifyTestDataWithinTransaction() { assertInTransaction(true); assertEquals("Deleting bob", 1, deletePerson(jdbcTemplate, BOB)); assertEquals("Adding jane", 1, addPerson(jdbcTemplate, JANE)); assertEquals("Adding sue", 1, addPerson(jdbcTemplate, SUE)); assertEquals( "Verifying the number of rows in the person table within a transaction.", 2, countRowsInPersonTable(jdbcTemplate)); }
@Override @Test @Transactional @Rollback(false) public void modifyTestDataWithinTransaction() { assertInTransaction(true); assertEquals("Adding jane", 1, addPerson(jdbcTemplate, JANE)); assertEquals("Adding sue", 1, addPerson(jdbcTemplate, SUE)); assertEquals( "Verifying the number of rows in the person table within a transaction.", 3, countRowsInPersonTable(jdbcTemplate)); }