public DetailsViewModelMapperFixture WithChangeOfEmployerChain() { var newApprenticeshipId = Fixture.Create <long>(); GetChangeOfEmployerChainResponse = new GetChangeOfEmployerChainResponse { ChangeOfEmployerChain = new List <GetChangeOfEmployerChainResponse.ChangeOfEmployerLink> { new GetChangeOfEmployerChainResponse.ChangeOfEmployerLink { ApprenticeshipId = newApprenticeshipId, EmployerName = Fixture.Create <string>(), StartDate = Fixture.Create <DateTime>(), EndDate = Fixture.Create <DateTime>(), StopDate = Fixture.Create <DateTime>(), CreatedOn = Fixture.Create <DateTime>() } } }; _encodingService.Setup(x => x.Encode(It.Is <long>(id => id == newApprenticeshipId), EncodingType.ApprenticeshipId)) .Returns(EncodedNewApprenticeshipId); return(this); }
public DetailsViewModelMapperFixture() { Fixture = new Fixture(); Source = Fixture.Create <DetailsRequest>(); ApiResponse = Fixture.Create <GetApprenticeshipResponse>(); ApiResponse.ProviderId = Source.ProviderId; CohortReference = Fixture.Create <string>(); AgreementId = Fixture.Create <string>(); URL = Fixture.Create <string>(); PriceEpisodesApiResponse = new GetPriceEpisodesResponse { PriceEpisodes = new List <GetPriceEpisodesResponse.PriceEpisode> { new GetPriceEpisodesResponse.PriceEpisode { Cost = 100, FromDate = DateTime.UtcNow } } }; GetApprenticeshipUpdatesResponse = new GetApprenticeshipUpdatesResponse { ApprenticeshipUpdates = new List <GetApprenticeshipUpdatesResponse.ApprenticeshipUpdate>() }; GetDataLocksResponse = new GetDataLocksResponse { DataLocks = new List <DataLock>() }; GetChangeOfPartyRequestsResponse = new GetChangeOfPartyRequestsResponse { ChangeOfPartyRequests = new List <GetChangeOfPartyRequestsResponse.ChangeOfPartyRequest>() }; GetChangeOfEmployerChainResponse = new GetChangeOfEmployerChainResponse { ChangeOfEmployerChain = new List <GetChangeOfEmployerChainResponse.ChangeOfEmployerLink>() }; GetNewerTrainingProgrammeVersionsResponse = new GetNewerTrainingProgrammeVersionsResponse() { NewerVersions = new List <TrainingProgramme>() }; GetTrainingProgrammeByStandardUIdResponse = new GetTrainingProgrammeResponse(); _encodingService = new Mock <IEncodingService>(); _encodingService.Setup(x => x.Encode(It.IsAny <long>(), EncodingType.CohortReference)).Returns(CohortReference); _encodingService.Setup(x => x.Encode(It.IsAny <long>(), EncodingType.PublicAccountLegalEntityId)).Returns(AgreementId); _authorizationService = new Mock <IAuthorizationService>(); EncodedNewApprenticeshipId = Fixture.Create <string>(); EncodedPreviousApprenticeshipId = Fixture.Create <string>(); }