use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class TeamTest method test_create_a_team.
@MediumTest
public void test_create_a_team() {
Team team = Team.create("Test Team", mContext);
assertNotNull(team.getId());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class StandupTimerTest method test_individual_status_end_time_is_set_if_finish_is_clicked_early.
@MediumTest
public void test_individual_status_end_time_is_set_if_finish_is_clicked_early() {
a.setMeetingStartTime(System.currentTimeMillis());
a.setCompletedParticipants(5);
a.setQuickestStatus(60);
a.setLongestStatus(120);
a.setTeam(new Team("Test team"));
clickFinishedButton();
assertTrue(0L != a.getIndividualStatusEndTime());
assertTrue(a.wasPersistMeetingCalled());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class StandupTimerTest method test_individual_timer_is_disabled_when_there_are_no_more_participants.
@MediumTest
public void test_individual_timer_is_disabled_when_there_are_no_more_participants() throws Throwable {
a.setCompletedParticipants(4);
a.setTotalParticipants(5);
clickNextButton();
// Test is not executing the thread that updates the UI, so do it manually
a.disableIndividualTimer();
assertEquals(0, a.getRemainingIndividualSeconds());
assertTrue(0L != a.getIndividualStatusEndTime());
TextView participantNumber = (TextView) a.findViewById(R.id.participant_number);
assertEquals(a.getString(R.string.individual_status_complete), participantNumber.getText());
TextView individualTimeRemaining = (TextView) a.findViewById(R.id.individual_time_remaining);
assertEquals("0:00", individualTimeRemaining.getText());
assertEquals(Color.GRAY, individualTimeRemaining.getTextColors().getDefaultColor());
Button nextButton = (Button) a.findViewById(R.id.next_button);
assertFalse(nextButton.isClickable());
assertEquals(Color.GRAY, nextButton.getTextColors().getDefaultColor());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class StandupTimerTest method test_total_time_remaining_is_changed_to_yellow_it_reaches_the_warning_time.
@MediumTest
public void test_total_time_remaining_is_changed_to_yellow_it_reaches_the_warning_time() {
Prefs.setWarningTime(a, 15);
a.setRemainingMeetingSeconds(16);
a.updateTimerValues();
a.updateDisplay();
TextView totalTimeRemaining = (TextView) a.findViewById(R.id.total_time_remaining);
assertEquals(Color.YELLOW, totalTimeRemaining.getTextColors().getDefaultColor());
}
use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.
the class StandupTimerTest method test_total_time_remaining_is_changed_to_red_when_time_runs_out.
@MediumTest
public void test_total_time_remaining_is_changed_to_red_when_time_runs_out() {
a.setRemainingMeetingSeconds(1);
a.updateTimerValues();
a.updateDisplay();
TextView totalTimeRemaining = (TextView) a.findViewById(R.id.total_time_remaining);
assertEquals(Color.RED, totalTimeRemaining.getTextColors().getDefaultColor());
}
Aggregations