Ejemplo n.º 1
0
        public async Task BuildersRisk_Review_ShouldReturnOkStatus()
        {
            var testData = _buildersRiskHelpers.GetDefaultTestData(BuildersRiskApplicationStatus.Submitted);

            var result = await _httpHelpers.CreateApplication(testData);

            await _httpHelpers.CreateQuote(result.ApplicationId);

            await _httpHelpers.SubmitApplication(result.ApplicationId);

            var update = new QuoteUpdate {
                Subtotal = 999999
            };

            var reviewResponse = await _httpHelpers.ReviewQuote(result.ApplicationId, update);

            JObject appObj = JObject.Parse(reviewResponse.Quote);

            var newSubtotal = decimal.Parse(appObj.GetValue("subtotal").ToString());

            newSubtotal.Should().Be(update.Subtotal);

            reviewResponse.StatusCode.Should().Be(HttpStatusCode.OK);
        }