コード例 #1
0
 @Test
 public void testUpdate() {
   Player result = playerDAO.createPlayer(player);
   result.setName("New Name");
   Player updated = playerDAO.updatePlayer(result);
   assertEquals("New Name", updated.getName());
   assertEquals(result.getId(), updated.getId());
 }
コード例 #2
0
 @Test
 public void testDelete() {
   Player result = playerDAO.createPlayer(player);
   assertNotNull(result);
   playerDAO.deletePlayer(result);
   Player deleted = playerDAO.getPlayerById(result.getId());
   assertNull(deleted);
 }
コード例 #3
0
 @Test
 public void testInsert() {
   Player result = playerDAO.createPlayer(player);
   assertEquals("Test Person", result.getName());
   assertNotNull(result.getId());
 }