use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class ConfigureStandupTimerTest method test_less_than_1_meeting_participants_displays_error_dialog.
@MediumTest
public void test_less_than_1_meeting_participants_displays_error_dialog() {
TextView t = (TextView) a.findViewById(R.id.num_participants);
t.setText("0");
Button b = (Button) a.findViewById(R.id.start_button);
b.performClick();
assertTrue(a.showInvalidNumberOfParticipantsDialogCalled());
assertFalse(a.startTimerCalled());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class ConfigureStandupTimerTest method test_specifying_an_invalid_number_of_participants_shouldnt_crash_the_app.
@MediumTest
public void test_specifying_an_invalid_number_of_participants_shouldnt_crash_the_app() {
Prefs.setAllowUnlimitedParticipants(a, true);
TextView t = (TextView) a.findViewById(R.id.num_participants);
t.setText("2198723498239487239487234987");
Button b = (Button) a.findViewById(R.id.start_button);
b.performClick();
assertFalse(a.showInvalidNumberOfParticipantsDialogCalled());
assertTrue(a.startTimerCalled());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class MeetingDAOTest method test_cannot_update_a_meeting_that_has_already_been_created.
@MediumTest
public void test_cannot_update_a_meeting_that_has_already_been_created() {
Meeting meeting = new Meeting(new Team("Test Team"), new GregorianCalendar(2010, 1, 5, 10, 15, 0).getTime(), 5, 240, 300, 30, 120);
meeting = dao.save(meeting);
try {
dao.save(meeting);
fail("Should have thrown an exception");
} catch (CannotUpdateMeetingException e) {
assertTrue(true);
}
}
use of android.test.suitebuilder.annotation.MediumTest 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 android.test.suitebuilder.annotation.MediumTest 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());
}
Aggregations