public async Task GetProviderInSnapshot() { PublishingAreaProvider expectedPublishAreaProvider = NewPublishingAreaProvider(); int snapShotId = NewRandomNumber(); string providerId = NewRandomString(); GivenTheSingleDapperReturnFor("sp_getProviderDetailsByProviderId", _ => _.ProviderSnapshotId == snapShotId && _.ProviderId == providerId, expectedPublishAreaProvider); PublishingAreaProvider actualPublishAreaProviders = await WhenTheProviderInSnapshotIsQueried(snapShotId, providerId); actualPublishAreaProviders .Should() .BeEquivalentTo(expectedPublishAreaProvider); }
public async Task <Provider> GetProviderInSnapshot(int providerSnapshotId, string providerId) { PublishingAreaProvider provider = await _publishingAreaRepository.GetProviderInSnapshot(providerSnapshotId, providerId); return(_mapper.Map <Provider>(provider)); }