コード例 #1
0
 @Test(expected = RuntimeException.class)
 public void attendeeWhoDoesntExistTriesToDecline() {
   fakeMeeting.setFrom("*****@*****.**");
   fakeMeeting.setAttendees("*****@*****.**");
   sm.setup(fakeMeeting);
   sm.setDeclined("*****@*****.**");
 }
コード例 #2
0
  @Test
  public void twoAttendeesInvited() {
    fakeMeeting.setFrom("*****@*****.**");
    fakeMeeting.setAttendees("[email protected]; [email protected]");
    sm.setup(fakeMeeting);

    ArrayList<String> invited = (ArrayList<String>) sm.getUnAnsweredRecipients();
    assertEquals(2, invited.size());
  }
コード例 #3
0
  @Test
  public void twoAttendeesInvitedOneAccepts() {
    fakeMeeting.setFrom("*****@*****.**");
    fakeMeeting.setAttendees("[email protected]; [email protected]");
    sm.setup(fakeMeeting);
    sm.setAccepted("*****@*****.**");

    ArrayList<String> invited = (ArrayList<String>) sm.getUnAnsweredRecipients();
    assertEquals(1, invited.size());
    assertTrue("*****@*****.**".equals(invited.get(0)));

    ArrayList<String> accepted = (ArrayList<String>) sm.getAcceptedRecipients();
    assertEquals(2, accepted.size());
    assertTrue("*****@*****.**".equals(accepted.get(0)));
    assertTrue("*****@*****.**".equals(accepted.get(1)));
  }
コード例 #4
0
 @Test(expected = RuntimeException.class)
 public void poorlyFormattedAttendees() {
   fakeMeeting.setFrom("*****@*****.**");
   fakeMeeting.setAttendees("a@@b.com; [email protected]");
   sm.setup(fakeMeeting);
 }