use of net.johnpwood.android.standuptimer.model.Team in project standup-timer by jwood.
the class TeamDAOTest method test_create_a_team.
@MediumTest
public void test_create_a_team() {
Team team = new Team("Test Team");
team = dao.save(team);
assertNotNull(team.getId());
assertEquals("Test Team", team.getName());
}
use of net.johnpwood.android.standuptimer.model.Team in project standup-timer by jwood.
the class TeamDAOTest method test_find_all_can_retrieve_all_teams.
@MediumTest
public void test_find_all_can_retrieve_all_teams() {
dao.save(new Team("Test Team 1"));
dao.save(new Team("Test Team 2"));
dao.save(new Team("Test Team 3"));
dao.save(new Team("Test Team 4"));
List<String> teams = dao.findAllTeamNames();
assertEquals(4, teams.size());
}
use of net.johnpwood.android.standuptimer.model.Team in project standup-timer by jwood.
the class TeamDAOTest method test_cannot_create_a_team_with_an_empty_name.
@MediumTest
public void test_cannot_create_a_team_with_an_empty_name() {
try {
dao.save(new Team(""));
assertTrue("Should have thrown an exception", false);
} catch (InvalidTeamNameException e) {
assertTrue(true);
}
try {
dao.save(new Team(" "));
assertTrue("Should have thrown an exception", false);
} catch (InvalidTeamNameException e) {
assertTrue(true);
}
}
use of net.johnpwood.android.standuptimer.model.Team in project standup-timer by jwood.
the class TeamDAOTest method test_find_a_team_by_id.
@MediumTest
public void test_find_a_team_by_id() {
Team team = new Team("Another Test Team");
team = dao.save(team);
Team foundTeam = dao.findById(team.getId());
assertEquals(team.getId(), foundTeam.getId());
assertEquals(team.getName(), foundTeam.getName());
}
use of net.johnpwood.android.standuptimer.model.Team in project standup-timer by jwood.
the class TeamDAOTest method test_find_by_team_returns_null_if_team_cannot_be_found.
@MediumTest
public void test_find_by_team_returns_null_if_team_cannot_be_found() {
Team team = dao.findByName("Blah Blah Blah");
assertNull(team);
}
Aggregations