public void TestListBooksByWriter() { IEnumerable <Book> books = new List <Book> { new Book { ID = 1, Title = "Title 1", WriterID = 1, Year = 1921 }, new Book { ID = 2, Title = "Title 2", WriterID = 1, Year = 1921 }, }; bookRepository.ListBooksByWriter(1).Returns(books); IEnumerable <Book> result = writerService.ListBooksByWriter(1); Assert.NotNull(result); Assert.Equal(2, result.Count()); }