public void SaveFinancialAssessment_Failed()
        {
            // Arrange
            FinancialAssessment_Failed_data();
            var controller = new FinancialAssessmentController(new FinancialAssessmentRepository(token));

            // Act

            var modelResponse = controller.AddFinancialAssessment(financialAssessmentViewModel);

            // Assert
            Assert.IsNotNull(modelResponse);
            Assert.IsTrue(modelResponse.RowAffected == 0);
        }
Exemplo n.º 2
0
        public void AddFinancialAssessment_Failed()
        {
            // Arrange
            FinancialAssessment_Failed();
            financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider);

            //Act
            var getFinancialAssessmentResult = financialAssessmentController.AddFinancialAssessment(emptyFinancialAssessmentModel);
            var response = getFinancialAssessmentResult as HttpResult <Response <FinancialAssessmentModel> >;

            //Assert
            Assert.IsNotNull(response);
            Assert.IsNotNull(response.Value);
            Assert.IsNull(response.Value.DataItems);
            Assert.IsTrue(response.Value.RowAffected == 0);
        }
Exemplo n.º 3
0
        public void AddFinancialAssessment_Success()
        {
            // Arrange
            FinancialAssessment_Success();
            financialAssessmentController = new FinancialAssessmentController(financialAssessmentDataProvider);

            //Act
            var getFinancialAssessmentResult = financialAssessmentController.AddFinancialAssessment(financialAssessmentModel);
            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.RowAffected > 0);
        }