Пример #1
0
        public override void Setup()
        {
            ApiClientResponse = new ProviderTlevelDetails
            {
                Id             = 1,
                DisplayName    = "Test",
                Ukprn          = 10000113,
                ProviderTlevel = new ProviderTlevel
                {
                    TlevelTitle = "Tlevel Title"
                }
            };

            InternalApiClient = Substitute.For <IResultsAndCertificationInternalApiClient>();
            InternalApiClient.GetTqProviderTlevelDetailsAsync(Ukprn, TqProviderId)
            .Returns(ApiClientResponse);

            var mapperConfig = new MapperConfiguration(c => c.AddMaps(typeof(ProviderMapper).Assembly));

            Mapper = new AutoMapper.Mapper(mapperConfig);
        }
Пример #2
0
        /// <summary>
        /// Gets the tq provider tlevel details asynchronous.
        /// </summary>
        /// <param name="aoUkprn">The ao ukprn.</param>
        /// <param name="tqProviderId">The tq provider identifier.</param>
        /// <returns></returns>
        public async Task <ProviderTlevelDetailsViewModel> GetTqProviderTlevelDetailsAsync(long aoUkprn, int tqProviderId)
        {
            var providerTlevelDetails = await _internalApiClient.GetTqProviderTlevelDetailsAsync(aoUkprn, tqProviderId);

            return(_mapper.Map <ProviderTlevelDetailsViewModel>(providerTlevelDetails));
        }