public void IncommingMessageIsAddedToStorage() { // Arrange SimCorpMobile simCorpMobile = new SimCorpMobile(); MessageStorage messageStorage = new MessageStorage(); simCorpMobile.MessageStorage = messageStorage; int numberOfMessages = 1; var expectedMessageStorageContent = new List <Message>(); expectedMessageStorageContent.Add(new Message(1, "+380951112233", "Message #1 recieved.", DateTime.Today.AddDays(-numberOfMessages))); // Act simCorpMobile.GenerateMessages(numberOfMessages); var actualMessageStorageContent = simCorpMobile.MessageStorage.Messages; // Assert CollectionAssert.AreEqual(expectedMessageStorageContent, actualMessageStorageContent, new MessageComparer()); }