public async Task GetLocalAuthorities() { PublishingAreaOrganisation areaOrganisationOne = NewPublishingAreaOrganisation(); PublishingAreaOrganisation areaOrganisationTwo = NewPublishingAreaOrganisation(); PublishingAreaOrganisation areaOrganisationThree = NewPublishingAreaOrganisation(); int snapshotId = NewRandomNumber(); PaymentOrganisation organisationOne = NewPaymentOrganisation(); PaymentOrganisation organisationTwo = NewPaymentOrganisation(); PaymentOrganisation organisationThree = NewPaymentOrganisation(); GivenThePublishingAreaOrganisationsForSnapshotId(snapshotId, areaOrganisationOne, areaOrganisationTwo, areaOrganisationThree); AndTheMappings((areaOrganisationOne, organisationOne), (areaOrganisationTwo, organisationTwo), (areaOrganisationThree, organisationThree)); IEnumerable <PaymentOrganisation> actualOrganisations = await WhenTheLocalAuthoritiesAreQueried(snapshotId); actualOrganisations .Should() .BeEquivalentTo <PaymentOrganisation>(new[] { organisationOne, organisationTwo, organisationThree }); }
private PaymentOrganisation MapProviderOrganisation(PublishingAreaOrganisation snapshot) => _mapper.Map <PaymentOrganisation>(snapshot);