public override void Setup()
        {
            _tokenServiceClient = Substitute.For <ITokenServiceClient>();
            _configuration      = new ResultsAndCertificationConfiguration
            {
                ResultsAndCertificationInternalApiSettings = new ResultsAndCertificationInternalApiSettings {
                    Uri = "http://tlevel.api.com"
                }
            };

            _mockApiResponse = new SoaLearnerRecordDetails
            {
                ProfileId                 = _profileId,
                Uln                       = _uln,
                Firstname                 = "Test",
                Lastname                  = "User",
                DateofBirth               = DateTime.UtcNow.AddYears(30),
                ProviderName              = "Barnsley College",
                ProviderUkprn             = 123456789,
                TlevelTitle               = "Title",
                RegistrationPathwayId     = 11,
                PathwayName               = "Design",
                PathwayCode               = "8631254",
                PathwayGrade              = "A",
                SpecialismName            = "Specialism",
                SpecialismCode            = "123456",
                SpecialismGrade           = "",
                IsEnglishAndMathsAchieved = true,
                HasLrsEnglishAndMaths     = true,
                IsSendLearner             = false,
                IndustryPlacementStatus   = IndustryPlacementStatus.Completed,
                ProviderAddress           = new Models.Contracts.ProviderAddress.Address {
                    AddressId = 1, OrganisationName = "Org", DepartmentName = "Dept", AddressLine1 = "Line1", AddressLine2 = "Line2", Town = "Town", Postcode = "xx1 1yy"
                },
                Status = RegistrationPathwayStatus.Active
            };
        }
Example #2
0
        public override void Given()
        {
            _address = new Address {
                AddressId = 1, DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA"
            };

            _expectedApiResult = new SoaLearnerRecordDetails
            {
                ProfileId     = 99,
                Uln           = 1234567890,
                Firstname     = "John",
                Lastname      = "Smith",
                DateofBirth   = DateTime.Now.AddYears(-20),
                ProviderName  = "Barsley College",
                ProviderUkprn = 879456123,

                TlevelTitle           = "Design, Surveying and Planning for Construction",
                RegistrationPathwayId = 1,
                PathwayName           = "Design, Surveying and Planning for Construction",
                PathwayCode           = "60358300",
                PathwayGrade          = "A*",
                SpecialismName        = "Building Services Design",
                SpecialismCode        = "ZTLOS003",
                SpecialismGrade       = "None",

                IsEnglishAndMathsAchieved = false,
                HasLrsEnglishAndMaths     = true,
                IsSendLearner             = false,
                IndustryPlacementStatus   = IndustryPlacementStatus.CompletedWithSpecialConsideration,

                ProviderAddress = _address,
                Status          = RegistrationPathwayStatus.Withdrawn
            };

            InternalApiClient.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_expectedApiResult);
        }
 public async override Task When()
 {
     _actualResult = await _apiClient.GetSoaLearnerRecordDetailsAsync(_providerUkprn, _profileId);
 }
Example #4
0
 public override void Given()
 {
     expectedApiResult = null;
     InternalApiClient.GetSoaLearnerRecordDetailsAsync(Arg.Any <long>(), Arg.Any <int>()).Returns(expectedApiResult);
 }