public void UpdateFinancialAssessmentDetails_Failed() { // Arrange FinancialAssessment_Failed(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider); //Act var getFinancialAssessmentResult = financialAssessmentController.UpdateFinancialAssessmentDetails(emptyFinancialAssessmentDetailsModel); var response = getFinancialAssessmentResult as HttpResult <Response <FinancialAssessmentDetailsModel> >; var financialAssessment = response.Value.DataItems; //Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Value); Assert.IsTrue(response.Value.RowAffected == 0); }
public void UpdateFinancialAssessmentDetails_Success() { // Arrange FinancialAssessment_Success(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider); //Act var getFinancialAssessmentResult = financialAssessmentController.UpdateFinancialAssessmentDetails(financialAssessmentDetail); var response = getFinancialAssessmentResult as HttpResult <Response <FinancialAssessmentDetailsModel> >; //Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Value); Assert.IsNotNull(response.Value.DataItems, "Data items can't be null"); Assert.IsTrue(response.Value.RowAffected > 0); }
public void updateFinancialAssessmentDetails_Success() { // Arrange var controller = new FinancialAssessmentController(new FinancialAssessmentRepository(token)); // Act financialAssessmentDetailsModel = new FinancialAssessmentDetailsModel() { FinancialAssessmentDetailsID = 1, FinancialAssessmentID = 1, CategoryTypeID = 1, Amount = 100, FinanceFrequencyID = 17, CategoryID = 1 }; var modelResponse = controller.UpdateFinancialAssessmentDetails(financialAssessmentDetailsModel); // Assert Assert.IsNotNull(modelResponse); Assert.IsTrue(modelResponse.RowAffected > 0); }