Search in sources :

Example 1 with CannotUpdateMeetingException

use of net.johnpwood.android.standuptimer.dao.CannotUpdateMeetingException 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);
    }
}
Also used : Meeting(net.johnpwood.android.standuptimer.model.Meeting) GregorianCalendar(java.util.GregorianCalendar) Team(net.johnpwood.android.standuptimer.model.Team) CannotUpdateMeetingException(net.johnpwood.android.standuptimer.dao.CannotUpdateMeetingException) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

MediumTest (android.test.suitebuilder.annotation.MediumTest)1 GregorianCalendar (java.util.GregorianCalendar)1 CannotUpdateMeetingException (net.johnpwood.android.standuptimer.dao.CannotUpdateMeetingException)1 Meeting (net.johnpwood.android.standuptimer.model.Meeting)1 Team (net.johnpwood.android.standuptimer.model.Team)1