Ejemplo n.º 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());
 }
Ejemplo n.º 2
0
  @Override
  public void setUp() throws Exception {
    super.setUp();

    playerDAO = new PlayerDAO(context);
    playerDAO.open();

    // add team to db
    team = DatabaseUtil.addTeamToDatabase(context, "Test Team");

    player = new Player();
    player.setName("Test Person");
    player.setTeam(team);
  }