use of android.test.suitebuilder.annotation.MediumTest 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 android.test.suitebuilder.annotation.MediumTest 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 android.test.suitebuilder.annotation.MediumTest 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);
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class TeamDAOTest method test_can_update_an_existing_team.
@MediumTest
public void test_can_update_an_existing_team() {
Team team1 = dao.save(new Team("Test Team 1"));
dao.save(new Team(team1.getId(), "Test Team 2"));
Team team = dao.findById(team1.getId());
assertEquals("Test Team 2", team.getName());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class TeamDAOTest method test_create_a_team_with_an_apostrophy_in_the_name.
@MediumTest
public void test_create_a_team_with_an_apostrophy_in_the_name() {
Team team = new Team("John's Team");
team = dao.save(team);
assertNotNull(team.getId());
assertEquals("John's Team", team.getName());
}
Aggregations