private Course GetCourse(string providerCode, string courseCode, string email, Provider ucasProviderData, UcasProviderEnrichmentGetModel orgEnrichmentData) { var ucasCourseData = _dataService.GetCourseForUser(email, providerCode, courseCode); var courseEnrichmentData = _enrichmentService.GetCourseEnrichmentForPublish(providerCode, courseCode, email); var courseToReturn = _courseMapper.MapToSearchAndCompareCourse( ucasProviderData, ucasCourseData, orgEnrichmentData.EnrichmentModel, courseEnrichmentData?.EnrichmentModel); return(courseToReturn); }
public void MapToSearchAndCompareCourse_ProviderLocation() { var res = mapper.MapToSearchAndCompareCourse( GenerateUcasProvider(), GenerateUcasCourse(), GenerateProviderEnrichmentWithoutContactDetails(), GenerateCourseEnrichmentModel() ); res.ProviderLocation.Should().NotBeNull(); res.ProviderLocation.Address.Should().NotBeNull(); res.ContactDetails.Address.Should().NotBeNull(); res.ProviderLocation.Address.Should().Be(res.ContactDetails.Address); res.IsSen.Should().BeFalse(); }