public async Task ListContainsTwoMessages() { var inMemorStorage = new InMemoryStorage(); inMemorStorage.AddMessage("foo", "hihihiha"); inMemorStorage.AddMessage("foo", "hahahaha"); var controller = new ChatController(inMemorStorage, _mockNatIntegration.Object); var sut = await controller.GetReceivedMessagesForUser("foo") as OkObjectResult; var a = sut.Value as List <string>; Assert.Equal(2, a.Count); }
public async Task ListIsReturned() { var inMemorStorage = new InMemoryStorage(); inMemorStorage.AddMessage("foo", "hihiihi"); var controller = new ChatController(inMemorStorage, _mockNatIntegration.Object); var sut = await controller.GetReceivedMessagesForUser("foo"); Assert.IsType <OkObjectResult>(sut); }