public async Task Artisans_CraftQuestionQuery_ShouldReturnCorrectQuestions(int craftId, int[] additionalQuestionIds = null)
        {
            var expectedQuestions = OperationsQuestions.GetQuestions(craftId, additionalQuestionIds);

            var actualQuestions = await _httpHelpers.GetQuestionsForClassification(_productId, "craft", craftId);

            actualQuestions.Length.Should().Be(expectedQuestions.Count);

            foreach (var question in expectedQuestions)
            {
                actualQuestions.Should().Contain(q => q.Id == question.Id);
            }
        }
示例#2
0
        public async Task Chubb_SpecialtyQuestionQuery_ShouldReturnCorrectQuestions(ChubbSpecialty specialty)
        {
            List <ChubbQuestion> expectedQuestions = ChubbSpecialtyQuestions.GetQuestions(specialty);

            var actualQuestions = await _httpHelpers.GetQuestionsForClassification(_productId, "specialty", (int)specialty);

            actualQuestions.Length.Should().Be(expectedQuestions.Count);

            foreach (var question in expectedQuestions)
            {
                actualQuestions.Should().Contain(q => q.Description == question.Description);
            }
        }