@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()); }
@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))); }