Search in sources :

Example 76 with MediumTest

use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.

the class MeetingDAOTest method test_delete_a_single_meeting.

@MediumTest
public void test_delete_a_single_meeting() {
    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);
    meeting = dao.findById(meeting.getId());
    assertNotNull(meeting.getId());
    dao.delete(meeting);
    meeting = dao.findById(meeting.getId());
    assertNull(meeting);
}
Also used : Meeting(net.johnpwood.android.standuptimer.model.Meeting) GregorianCalendar(java.util.GregorianCalendar) Team(net.johnpwood.android.standuptimer.model.Team) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 77 with MediumTest

use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.

the class ConfigureStandupTimerTest method test_greater_than_20_meeting_participants_succeeds_if_unlimited_participants_is_allowed.

@MediumTest
public void test_greater_than_20_meeting_participants_succeeds_if_unlimited_participants_is_allowed() {
    Prefs.setAllowUnlimitedParticipants(a, true);
    TextView t = (TextView) a.findViewById(R.id.num_participants);
    t.setText("21");
    Button b = (Button) a.findViewById(R.id.start_button);
    b.performClick();
    assertFalse(a.showInvalidNumberOfParticipantsDialogCalled());
    assertTrue(a.startTimerCalled());
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 78 with MediumTest

use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.

the class ConfigureStandupTimerTest method test_about_box_displayed_successfully.

@MediumTest
public void test_about_box_displayed_successfully() {
    MenuItem menuItem = EasyMock.createMock(MenuItem.class);
    EasyMock.expect(menuItem.getItemId()).andReturn(R.id.about);
    EasyMock.replay(menuItem);
    a.onOptionsItemSelected(menuItem);
    assertTrue(a.displayAboutBoxCalled());
    assertFalse(a.displayHelpDialogCalled());
    assertFalse(a.displaySettingsCalled());
    assertFalse(isFinishCalled());
    EasyMock.verify(menuItem);
}
Also used : MenuItem(android.view.MenuItem) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 79 with MediumTest

use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.

the class ConfigureStandupTimerTest method test_settings_displayed_successfully.

@MediumTest
public void test_settings_displayed_successfully() {
    MenuItem menuItem = EasyMock.createMock(MenuItem.class);
    EasyMock.expect(menuItem.getItemId()).andReturn(R.id.settings);
    EasyMock.replay(menuItem);
    a.onOptionsItemSelected(menuItem);
    assertFalse(a.displayAboutBoxCalled());
    assertFalse(a.displayHelpDialogCalled());
    assertTrue(a.displaySettingsCalled());
    assertFalse(isFinishCalled());
    assertFalse(a.displayTeamConfigurationCalled());
    EasyMock.verify(menuItem);
}
Also used : MenuItem(android.view.MenuItem) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 80 with MediumTest

use of android.test.suitebuilder.annotation.MediumTest in project standup-timer by jwood.

the class ConfigureStandupTimerTest method test_valud_number_of_meeting_participants_starts_the_timer.

@MediumTest
public void test_valud_number_of_meeting_participants_starts_the_timer() {
    TextView t = (TextView) a.findViewById(R.id.num_participants);
    t.setText("11");
    Button b = (Button) a.findViewById(R.id.start_button);
    b.performClick();
    assertFalse(a.showInvalidNumberOfParticipantsDialogCalled());
    assertTrue(a.startTimerCalled());
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

MediumTest (android.test.suitebuilder.annotation.MediumTest)996 View (android.view.View)246 ListView (android.widget.ListView)150 Cursor (android.database.Cursor)116 Handler (android.os.Handler)116 Suppress (android.test.suitebuilder.annotation.Suppress)69 TextView (android.widget.TextView)67 ContentValues (android.content.ContentValues)63 ServiceStatus (com.vodafone360.people.service.ServiceStatus)60 SQLiteCursor (android.database.sqlite.SQLiteCursor)54 SQLiteStatement (android.database.sqlite.SQLiteStatement)49 IOException (java.io.IOException)49 UiThreadTest (android.test.UiThreadTest)48 LogRec (com.android.internal.util.StateMachine.LogRec)42 ContentResolver (android.content.ContentResolver)37 Intent (android.content.Intent)36 Message (android.os.Message)36 GridView (android.widget.GridView)36 InputStream (java.io.InputStream)36 ByteArrayInputStream (java.io.ByteArrayInputStream)35