public void GetAllListings_ReturnsAListingListOfValueZero_WhenCalledAndDatabaseIsEmpty() { // Arrange int expected = 0; SqlServerListingRepository listingRepo = new SqlServerListingRepository(context); // Act int actual = listingRepo.GetAllListings().Count(); // Assert Assert.AreEqual(expected, actual); }
public void GetAllListings_ReturnsAListingListOfLengthOne_WhenCalledAndDatabaseHasOneListing() { // Arrange int expected = 1; InsertData(); SqlServerListingRepository listingRepo = new SqlServerListingRepository(context); // Act int actual = listingRepo.GetAllListings().Count(); // Assert Assert.AreEqual(expected, actual); }