public void Then_No_Disagree_Returns_Zero_Count(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.ApprenticeFeedback.ProviderAttribute = new List <InnerApi.Responses.GetApprenticeFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "First Attribute",
                    Category = "Category",
                    Agree    = 12,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Second Attribute",
                    Category = "Category",
                    Agree    = 13,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Third Attribute",
                    Category = "Category",
                    Agree    = 14,
                    Disagree = 0
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.ApprenticeFeedback.FeedbackAttributes.Sum(x => x.Disagree).Should().Be(0);
            response.ApprenticeFeedback.FeedbackAttributes.Select(x => x.Name).Should().Contain(source.ApprenticeFeedback.ProviderAttribute.Select(c => c.Name).ToList());
            response.ApprenticeFeedback.FeedbackAttributes.Sum(x => x.Agree).Should().Be(39);
        }
Exemple #2
0
        public void Then_No_Weaknesses_Returns_Zero_Count(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.EmployerFeedback.FeedbackAttributes = new List <InnerApi.Responses.GetEmployerFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "First Attribute",
                    Strength      = 12,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Second Attribute",
                    Strength      = 13,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Third Attribute",
                    Strength      = 14,
                    Weakness      = 0
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.EmployerFeedback.FeedbackAttributes.Sum(x => x.Weakness).Should().Be(0);
            response.EmployerFeedback.FeedbackAttributes.Select(x => x.AttributeName).Should().Contain(source.EmployerFeedback.FeedbackAttributes.Select(c => c.AttributeName).ToList());
            response.EmployerFeedback.FeedbackAttributes.Sum(x => x.Strength).Should().Be(39);
        }
        public void Then_Returns_EmptyApprentice_Feedback_Attribute_Lists_If_Totals_Are_Zero(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.ApprenticeFeedback.ProviderAttribute = new List <InnerApi.Responses.GetApprenticeFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "First Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Second Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Third Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.ApprenticeFeedback.FeedbackAttributes.Should().BeEmpty();
        }
        public void Then_Returns_All_Available_Apprentice_Feedback_Attribute_Agreess_And_Disagrees_Where_Agrees_Disagrees_Greater_Than_Zero(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.ApprenticeFeedback.ProviderAttribute = new List <InnerApi.Responses.GetApprenticeFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "First Attribute",
                    Category = "Category",
                    Agree    = 1,
                    Disagree = 1
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Second Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Third Attribute",
                    Category = "Category",
                    Agree    = 1,
                    Disagree = 1
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Fourth Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Fifth Attribute",
                    Category = "Category",
                    Agree    = 1,
                    Disagree = 1
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Sixth Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Seventh Attribute",
                    Category = "Category",
                    Agree    = 1,
                    Disagree = 1
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Eighth Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Ninth Attribute",
                    Category = "Category",
                    Agree    = 0,
                    Disagree = 0
                },
                new InnerApi.Responses.GetApprenticeFeedbackAttributeItem
                {
                    Name     = "Tenth Attribute",
                    Category = "Category",
                    Agree    = 1,
                    Disagree = 1
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.ApprenticeFeedback.FeedbackAttributes.Select(x => x.Name)
            .Should().ContainInOrder(
                new List <string> {
                "First Attribute",
                "Third Attribute",
                "Fifth Attribute",
                "Seventh Attribute",
                "Tenth Attribute"
            });
        }
Exemple #5
0
        public void Then_Returns_Empty_Employer_Feedback_Attribute_Lists_If_Totals_Are_Zero(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.EmployerFeedback.FeedbackAttributes = new List <InnerApi.Responses.GetEmployerFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "First Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Second Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Third Attribute",
                    Strength      = 0,
                    Weakness      = 0
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.EmployerFeedback.FeedbackAttributes.Should().BeEmpty();
        }
Exemple #6
0
        public void Then_Returns_All_Available_Employer_Feedback_Attribute_Strengths_And_Weaknesses_Where_Strengths_Weaknesses_Greater_Than_Zero(InnerApi.Responses.GetProvidersListItem source, string sectorSubjectArea)
        {
            source.EmployerFeedback.FeedbackAttributes = new List <InnerApi.Responses.GetEmployerFeedbackAttributeItem>
            {
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "First Attribute",
                    Strength      = 1,
                    Weakness      = 1
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Second Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Third Attribute",
                    Strength      = 1,
                    Weakness      = 1
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Fourth Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Fifth Attribute",
                    Strength      = 1,
                    Weakness      = 1
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Sixth Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Seventh Attribute",
                    Strength      = 1,
                    Weakness      = 1
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Eighth Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Ninth Attribute",
                    Strength      = 0,
                    Weakness      = 0
                },
                new InnerApi.Responses.GetEmployerFeedbackAttributeItem
                {
                    AttributeName = "Tenth Attribute",
                    Strength      = 1,
                    Weakness      = 1
                }
            };

            var response = new GetTrainingCourseProviderListItem().Map(source, sectorSubjectArea, 1, new List <DeliveryModeType>(), new List <FeedbackRatingType>(), new List <FeedbackRatingType>(), true);

            response.EmployerFeedback.FeedbackAttributes.Select(x => x.AttributeName)
            .Should().ContainInOrder(
                new List <string> {
                "First Attribute",
                "Third Attribute",
                "Fifth Attribute",
                "Seventh Attribute",
                "Tenth Attribute"
            });
        }