public void RemoveInvitation_PostiveTest() { invitationCollection = GetEmptyInviteCollection(); invitationCollection.AddInvitation(invitation, customer); invitationCollection.RemoveInvitation(invitation); Assert.AreEqual(invitationCollection.Count(), 0); }
public void GetInvitationById_NegativeTest() { invitationCollection = GetEmptyInviteCollection(); invitationCollection.AddInvitation(invitation, customer); var id = Guid.NewGuid().ToString(); var invite = invitationCollection.GetInvitationById(id); Assert.IsNull(invite); }
public void GetInvitationById_PostiveTest() { invitationCollection = GetEmptyInviteCollection(); invitationCollection.AddInvitation(invitation, customer); var id = invitation.InvitationId; var invite = (Invitation)invitationCollection.GetInvitationById(id); Assert.AreEqual(id, invite.InvitationId); }
public void RemoveInvitation_NegativeTest1() { invitationCollection = GetEmptyInviteCollection(); var invitation = new Mock <IInvitation>(); var expectedException = false; var exceptionType = string.Empty; try { invitationCollection.AddInvitation(invitation.Object, customer); } catch (ArgumentNullException) { expectedException = true; } catch (Exception e) { exceptionType = e.GetType().ToString(); } Assert.IsTrue(expectedException, string.Format("Expected excption not got, got {0} instead", exceptionType)); }
public void AddInvitation_PositiveTest1() { invitationCollection = GetEmptyInviteCollection(); invitationCollection.AddInvitation(invitation, customer); Assert.AreEqual(invitationCollection.Count(), 1); }