public void RemoverRemovePerson_SecretaryAsParameter_PersonRemoved() { // Arrange var secretary = Secretary.New(Instances.Name, Instances.Username, Instances.Password); var secretaryid = secretary.ID; // Act secretary.Remove(); // Assert try { Secretary.GetByID(secretaryid); Assert.Fail(); } catch (InvalidIDException) { } }
public void RemoverRemoveMessage_ValidParameters_MessageRemoved() { // Arrange Secretary sender = Secretary.GetByID(1); Creator.CreateSecretary(Instances.Name, Instances.Username, Instances.Password); List <Person> recipients = new List <Person> { Secretary.GetByID(2) }; Creator.CreateMessage(sender, Instances.Title, Instances.Text, recipients, Instances.Filepaths); Message message = Message.GetByID(1); // Act Remover.RemoveMessage(message); // Assert Assert.AreEqual(0, Message.GetAll().Count); Assert.AreEqual(0, sender.SentMessages.Count); Assert.AreEqual(0, recipients[0].RecievedMessages.Count); }