Search in sources :

Example 86 with MediumTest

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);
    }
}
Also used : InvalidTeamNameException(net.johnpwood.android.standuptimer.dao.InvalidTeamNameException) Team(net.johnpwood.android.standuptimer.model.Team) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 87 with MediumTest

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());
}
Also used : Team(net.johnpwood.android.standuptimer.model.Team) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 88 with MediumTest

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);
}
Also used : Team(net.johnpwood.android.standuptimer.model.Team) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 89 with MediumTest

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());
}
Also used : Team(net.johnpwood.android.standuptimer.model.Team) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 90 with MediumTest

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());
}
Also used : Team(net.johnpwood.android.standuptimer.model.Team) 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