public void CreateAuthor_ShouldCreateValidAuthor() { // Fixture setup var authorRepo = new InMemoryRepository <Author>(); var authorService = new AuthorApplicationService(authorRepo); var expected = new Author() { FirstName = "blah", LastName = "fdlskhgdsa", Synopsis = "fhlkhdfaslkhjgoiuwer" }; // Exercise the SUT (system under test) authorService.CreateAuthor( expected.FirstName, expected.LastName, expected.Synopsis); // State verification var actual = authorRepo.AsQueryable().FirstOrDefault(); Assert.Equal(1, authorRepo.Count()); Assert.Equal(expected.FirstName, actual.FirstName); Assert.Equal(expected.LastName, actual.LastName); Assert.Equal(expected.Synopsis, actual.Synopsis); }