示例#1
0
        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);
        }
示例#2
0
        public async Task <Provider> GetProviderInSnapshot(int providerSnapshotId, string providerId)
        {
            PublishingAreaProvider provider = await _publishingAreaRepository.GetProviderInSnapshot(providerSnapshotId, providerId);

            return(_mapper.Map <Provider>(provider));
        }