public async System.Threading.Tasks.Task DeleteEstate_NotSuccessAsync() { // Arrange var estateRepo = new EstatesRepository(_context); var resultBeforeDelete = estateRepo.GetAllEstates(); // Act await estateRepo.DeleteEstate(-1); var resultAfterDelete = estateRepo.GetAllEstates(); // Assert CollectionAssert.AreEqual(resultBeforeDelete.Result, resultAfterDelete.Result); }
public void GetEstate_ById() { // Arrange var estateRepo = new EstatesRepository(_context); var resultExpected = estateRepo.GetAllEstates(); // Act var result = estateRepo.GetEstate(resultExpected.Result.First().Id); // Assert Assert.AreEqual(resultExpected.Result.First(), result.Result); }