public async Task Then_Maps_ApprenticeshipStatus( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, ApprenticeshipDetailsToViewModelMapper mapper) { var result = await mapper.Map(source); result.Status.Should().Be(source.ApprenticeshipStatus.GetDescription()); }
public async Task Then_Maps_PlannedEndDate( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, ApprenticeshipDetailsToViewModelMapper mapper) { var result = await mapper.Map(source); result.PlannedEndDate.Should().Be(source.EndDate); }
public async Task Then_Maps_CourseName( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, ApprenticeshipDetailsToViewModelMapper mapper) { var result = await mapper.Map(source); result.CourseName.Should().Be(source.CourseName); }
public async Task Then_Maps_ApprenticeName( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, ApprenticeshipDetailsToViewModelMapper mapper) { var result = await mapper.Map(source); result.ApprenticeName.Should().Be($"{source.FirstName} {source.LastName}"); }
public async Task Then_Maps_Alerts( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, ApprenticeshipDetailsToViewModelMapper mapper) { var alertStrings = source.Alerts.Select(x => x.GetDescription()); var result = await mapper.Map(source); result.Alerts.Should().BeEquivalentTo(alertStrings); }
public async Task Then_Maps_ApprenticeshipId( GetApprenticeshipsResponse.ApprenticeshipDetailsResponse source, string encodedApprenticeshipId, [Frozen] Mock <IEncodingService> mockEncodingService, ApprenticeshipDetailsToViewModelMapper mapper) { mockEncodingService .Setup(service => service.Encode(source.Id, EncodingType.ApprenticeshipId)) .Returns(encodedApprenticeshipId); var result = await mapper.Map(source); result.EncodedApprenticeshipId.Should().Be(encodedApprenticeshipId); }