Search in sources :

Example 1 with InvalidTeamNameException

use of net.johnpwood.android.standuptimer.dao.InvalidTeamNameException 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)

Aggregations

MediumTest (android.test.suitebuilder.annotation.MediumTest)1 InvalidTeamNameException (net.johnpwood.android.standuptimer.dao.InvalidTeamNameException)1 Team (net.johnpwood.android.standuptimer.model.Team)1