public override void Setup()
        {
            _tokenServiceClient = Substitute.For <ITokenServiceClient>();

            _configuration = new ResultsAndCertificationConfiguration
            {
                ResultsAndCertificationInternalApiSettings = new ResultsAndCertificationInternalApiSettings {
                    Uri = "http://tlevel.api.com"
                }
            };

            _mockHttpResult = new PathwaySpecialisms
            {
                Id          = 1,
                PathwayCode = "12345",
                PathwayName = "Test 1",
                Specialisms = new List <SpecialismDetails> {
                    new SpecialismDetails {
                        Id = 1, Code = "76543", Name = "Specialism 1"
                    }
                }
            };
        }
Exemplo n.º 2
0
        public override void Setup()
        {
            ApiClientResponse = new PathwaySpecialisms
            {
                Id          = 1,
                PathwayCode = "12345",
                PathwayName = "Test 1",
                Specialisms = new List <SpecialismDetails> {
                    new SpecialismDetails {
                        Id = 1, Code = "76543", Name = "Specialism 1"
                    }
                }
            };

            Logger             = Substitute.For <ILogger <RegistrationLoader> >();
            BlobStorageService = Substitute.For <IBlobStorageService>();
            InternalApiClient  = Substitute.For <IResultsAndCertificationInternalApiClient>();
            InternalApiClient.GetPathwaySpecialismsByPathwayLarIdAsync(Ukprn, PathwayLarId).Returns(ApiClientResponse);

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

            Mapper = new AutoMapper.Mapper(mapperConfig);
        }
 public async override Task When()
 {
     _pathwaySpecialismsResult = await _service.GetPathwaySpecialismsByPathwayLarIdAsync(_tlAwardingOrganisation.UkPrn, _pathway.LarId);
 }
 public async override Task When()
 {
     _pathwaySpecialismsResult = await _service.GetPathwaySpecialismsByPathwayLarIdAsync(_ukprn, _pathway.LarId);
 }
 public async override Task When()
 {
     _result = await _apiClient.GetPathwaySpecialismsByPathwayLarIdAsync(_ukprn, _pathwayLarId);
 }