public void GetFinancialAssessment_Failed() { // Arrange var controller = new FinancialAssessmentController(new FinancialAssessmentRepository(token)); // Act var modelResponse = controller.GetFinancialAssessment(0, 0).Result; // Assert Assert.IsNull(modelResponse); }
public void GetFinancialAssessment_Success() { // Arrange var controller = new FinancialAssessmentController(new FinancialAssessmentRepository(token)); // Act var modelResponse = controller.GetFinancialAssessment(contactId, financialAssessmentID).Result; // Assert Assert.IsNotNull(modelResponse); Assert.IsNotNull(modelResponse.DataItems); Assert.IsTrue(modelResponse.DataItems.Count > 0); }
public void GetFinancialAssessment_Failed() { // Arrange FinancialAssessment_Failed(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider); //Act var getFinancialAssessmentResult = financialAssessmentController.GetFinancialAssessment(0, 0); var response = getFinancialAssessmentResult as HttpResult <Response <FinancialAssessmentModel> >; //Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Value); Assert.IsNotNull(response.Value.DataItems, "Data items can't be null"); Assert.IsTrue(response.Value.DataItems.Count == 0); }
public void GetFinancialAssessment_Success() { // Arrange FinancialAssessment_Success(); financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider); //Act var getFinancialAssessmentResult = financialAssessmentController.GetFinancialAssessment(contactId, financialAssessmentID); var response = getFinancialAssessmentResult as HttpResult <Response <FinancialAssessmentModel> >; //Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Value); Assert.IsNotNull(response.Value.DataItems, "Data items can't be null"); Assert.IsTrue(response.Value.DataItems.Count > 0, "Atleast one Financial Assessment must exists."); }