public async Task Should_Internal_Server_Error_Get_List_Throw_Exception()
        {
            var identityServiceMock = new Mock <IIdentityService>();
            var validateServiceMock = new Mock <IValidateService>();
            var serviceMock         = new Mock <ICostCalculationService>();

            var controller = new CostCalculationController(identityServiceMock.Object, validateServiceMock.Object, serviceMock.Object);
            var response   = await controller.Get(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>());

            controller.Dispose();
            Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response));
        }
        public async Task Should_Success_Get_Single_By_Id()
        {
            var identityServiceMock = new Mock <IIdentityService>();
            var validateServiceMock = new Mock <IValidateService>();
            var serviceMock         = new Mock <ICostCalculationService>();

            serviceMock
            .Setup(service => service.GetSingleById(It.IsAny <int>()))
            .ReturnsAsync(new CostCalculationViewModel());

            var controller = new CostCalculationController(identityServiceMock.Object, validateServiceMock.Object, serviceMock.Object);
            var response   = await controller.Get(It.IsAny <int>());

            controller.Dispose();
            Assert.Equal((int)HttpStatusCode.OK, GetStatusCode(response));
        }
        public async Task Should_Internal_Server_Error_Get_Single_By_Id_With_Exception()
        {
            var identityServiceMock = new Mock <IIdentityService>();
            var validateServiceMock = new Mock <IValidateService>();
            var serviceMock         = new Mock <ICostCalculationService>();

            serviceMock
            .Setup(service => service.GetSingleById(It.IsAny <int>()))
            .ThrowsAsync(new Exception());

            var controller = new CostCalculationController(identityServiceMock.Object, validateServiceMock.Object, serviceMock.Object);
            var response   = await controller.Get(It.IsAny <int>());

            controller.Dispose();
            Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response));
        }