public async Task GetPublishers_Void_TaskActionResultContainsIEnumerableOfPublisher() { // Arrange List <Publisher> expectedData = GetFakeList(); InitializeInmemoryDatabase(out DbContextOptions <GameReviewsContext> options, GetFakeList()); // Act using (var context = new GameReviewsContext(options)) { PublishersController publishersController = new PublishersController(context); IEnumerable <Publisher> publishers = (await publishersController.GetPublishers()).Value; // Assert Assert.Equal(expectedData.Count, publishers.Count()); for (int i = 0; i < expectedData.Count; ++i) { Assert.True(AreEqual(expectedData[i], publishers.ElementAt(i))); } } }