public void AndMappingIsNationWide(string value, bool expectedResult) { var domainType = new ApprenticeshipSummary { VacancyLocationType = value }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.IsNationwide.Should().Be(expectedResult); }
public void ThenTrainingProviderNameMapsCorrectly() { var providerName = "desc"; var domainType = new ApprenticeshipSummary { ProviderName = providerName }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.TrainingProviderName.Should().Be(providerName, "Then map ProviderName to TrainingProviderName"); }
public void ThenShortDescriptionMapsCorrectly() { var description = "desc"; var domainType = new ApprenticeshipSummary { Description = description }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.ShortDescription.Should().Be(description, "Then map Description to ShortDescription"); }
public void ThenProviderUkprnMapsCorrectly() { var ukprn = 88888888; var domainType = new ApprenticeshipSummary { Ukprn = ukprn }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.Ukprn.Should().Be(ukprn); }
public void ThenDistanceInMilesMapsCorrectly() { var expectedDistance = 3245.3245; var domainType = new ApprenticeshipSummary { DistanceInMiles = expectedDistance }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.DistanceInMiles.Should().Be(expectedDistance); }
public void AndMappingTrainingType(int?standardId, string frameworkCode, ApiTypes.TrainingType expectedTrainingType) { var expectedTrainingCode = standardId.HasValue ? standardId.ToString() : frameworkCode; var domainType = new ApprenticeshipSummary() { FrameworkLarsCode = frameworkCode, StandardLarsCode = standardId }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.TrainingType.Should().Be(expectedTrainingType); result.TrainingCode.Should().Be(expectedTrainingCode); }
public void ThenGeoCoordinatesMapCorrectly() { var domainType = new ApprenticeshipSummary { Location = new GeoPoint() { Lat = 51.3288148990, Lon = 0.4452948632 } }; var result = _mapper.Map <ApiTypes.ApprenticeshipSummary>(domainType); result.Location.Latitude.Should().Be(51.3288148990m, "Then map latitude to Location"); result.Location.Longitude.Should().Be(0.4452948632m, "Then map longitude to Location"); }