public void DeleteFinancialAssessment_Failed() { // Arrange var controller = new FinancialAssessmentController(new FinancialAssessmentRepository(token)); // Act var modelResponse = controller.DeleteFinancialAssessmentDetail(financialAssessmentDetailFailedID, DateTime.UtcNow); // Assert Assert.IsNotNull(modelResponse); Assert.IsTrue(modelResponse.RowAffected == 0); }
public void DeleteFinancialAssessment_Success() { // Arrange FinancialAssessment_Success(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider); //Act var deleteFinancialAssessmentResult = financialAssessmentController.DeleteFinancialAssessmentDetail(financialAssessmentDetailID, DateTime.UtcNow); var response = deleteFinancialAssessmentResult as HttpResult <Response <bool> >; // Assert Assert.IsNotNull(response); Assert.AreEqual(1, response.Value.RowAffected, "Financial assessment details could not be deleted."); }
public void DeleteFinancialAssessment_Failed() { // Arrange FinancialAssessment_Failed(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentRuleEngine); //Act var deleteFinancialAssessmentResult = financialAssessmentController.DeleteFinancialAssessmentDetail(financialAssessmentDetailID, DateTime.UtcNow); var response = deleteFinancialAssessmentResult as HttpResult <Response <bool> >; //Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Value); Assert.AreEqual(0, response.Value.RowAffected, "Financial assessment details deleted."); }