public void Then_The_Fields_Are_Mapped(InnerApi.Responses.GetShortlistItem shortlistItem) { shortlistItem.ProviderDetails.FeedbackRatings = new List <GetFeedbackRatingItem> { new GetFeedbackRatingItem { FeedbackName = "Good", FeedbackCount = 92, }, new GetFeedbackRatingItem { FeedbackName = "Excellent", FeedbackCount = 29, }, new GetFeedbackRatingItem { FeedbackName = "Poor", FeedbackCount = 7, }, new GetFeedbackRatingItem { FeedbackName = "Very Poor", FeedbackCount = 1, } }; var actual = new GetProviderCourseItem().Map(shortlistItem); actual.Should().BeEquivalentTo(shortlistItem.Course, options => options.ExcludingMissingMembers()); actual.Website.Should().Be(shortlistItem.ProviderDetails.StandardInfoUrl); actual.ProviderId.Should().Be(shortlistItem.ProviderDetails.Ukprn); actual.ProviderAddress.Should().BeEquivalentTo(shortlistItem.ProviderDetails.ProviderAddress); actual.Feedback.TotalEmployerResponses.Should().Be(129); actual.Feedback.TotalFeedbackRating.Should().Be(3); }
public void Then_The_Fields_Are_Mapped(GetTrainingCourseProviderResult providerStandardItem) { providerStandardItem.ProviderStandard.FeedbackRatings = new List <GetFeedbackRatingItem> { new GetFeedbackRatingItem { FeedbackName = "Good", FeedbackCount = 92, }, new GetFeedbackRatingItem { FeedbackName = "Excellent", FeedbackCount = 29, }, new GetFeedbackRatingItem { FeedbackName = "Poor", FeedbackCount = 7, }, new GetFeedbackRatingItem { FeedbackName = "Very Poor", FeedbackCount = 1, } }; var actual = new GetProviderCourseItem().Map(providerStandardItem, "", 1, true); actual.Should().BeEquivalentTo(providerStandardItem.Course, options => options.ExcludingMissingMembers()); actual.Website.Should().Be(providerStandardItem.ProviderStandard.StandardInfoUrl); actual.ProviderId.Should().Be(providerStandardItem.ProviderStandard.Ukprn); actual.ProviderAddress.Should().BeEquivalentTo(providerStandardItem.ProviderStandard.ProviderAddress); actual.Feedback.TotalEmployerResponses.Should().Be(129); actual.Feedback.TotalFeedbackRating.Should().Be(3); actual.MarketingInfo.Should().Be(providerStandardItem.ProviderStandard.MarketingInfo); }