コード例 #1
0
        public async Task Artisans_Extend_ShouldExtendEffectivePeriod()
        {
            var testData = _nautilusHelpers.GetDefaultTestData(ArtisansApplicationStatus.Approved);

            var create = await _httpHelpers.CreateApplication(testData);

            var applicationId = create.ApplicationId;

            var backDateResult = await _httpHelpers.QaBackdate(_productId, applicationId);

            backDateResult.Should().Be(HttpStatusCode.OK);

            var initialEffectiveDate = await GetApplicationEffectiveDate(applicationId);

            var expectedEffectiveDate = DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy");

            initialEffectiveDate.Should().Be(expectedEffectiveDate);

            var extendStatus = await _httpHelpers.ExtendQuote(applicationId);

            extendStatus.Should().Be(HttpStatusCode.OK);

            var extendedEffectiveDate = await GetApplicationEffectiveDate(applicationId);

            expectedEffectiveDate = DateTime.Now.ToString("MM/dd/yyyy");

            extendedEffectiveDate.Should().Be(expectedEffectiveDate);
        }