Exemplo n.º 1
0
        public async Task Artisans_GetQuote_ShouldReturnCorrectSchema()
        {
            var testData = _nautilusHelpers.GetDefaultTestData(ArtisansApplicationStatus.Quoted);

            var applicationResult = await _testHelpers.CreateApplication(testData);

            var applicationId = applicationResult.ApplicationId;

            await _testHelpers.CreateQuote(applicationId);

            var quoteResult = await _testHelpers.GetQuote(applicationId);

            quoteResult.StatusCode.Should().Be(HttpStatusCode.OK);

            JObject quoteObj = JObject.Parse(quoteResult.Quote);

            var schemaData   = _quoteSchema.ToJson();
            var schemaErrors = _quoteSchema.Validate(quoteObj);

            schemaErrors.Count.Should().Be(0);
        }