public override void Given() { ProfileId = 11; _address = new AddressViewModel { AddressId = 1, DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA" }; _mockLearnerDetails = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId, Uln = 1234567890, LearnerName = "John Smith", DateofBirth = DateTime.Now.AddYears(-20), ProviderDisplayName = "Barsley College (569874567)", ProviderName = "Barsley College", ProviderUkprn = 569874567, TlevelTitle = "Design, Surveying and Planning for Construction", RegistrationPathwayId = 1, PathwayDisplayName = "Design, Surveying and Planning for Construction (60358300)", PathwayName = "Design, Surveying and Planning for Construction", PathwayCode = "60358300", PathwayGrade = "A*", SpecialismDisplayName = "Building Services Design (ZTLOS003)", SpecialismName = "Building Services Design", SpecialismCode = "ZTLOS003", SpecialismGrade = "None", IsEnglishAndMathsAchieved = true, HasLrsEnglishAndMaths = false, IsSendLearner = true, IndustryPlacementStatus = IndustryPlacementStatus.Completed, HasPathwayResult = true, IsNotWithdrawn = false, IsLearnerRegistered = true, IsIndustryPlacementAdded = true, IsIndustryPlacementCompleted = true, ProviderAddress = _address, }; SoaLearnerRecordDetailsViewModel = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId }; SoaPrintingResponse = new SoaPrintingResponse { Uln = _mockLearnerDetails.Uln, LearnerName = _mockLearnerDetails.LearnerName, IsSuccess = true }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_mockLearnerDetails); StatementOfAchievementLoader.CreateSoaPrintingRequestAsync(ProviderUkprn, _mockLearnerDetails).Returns(SoaPrintingResponse); }
public override void Given() { CreateMapper(); ProviderUkprn = 987654321; SoaLearnerRecordDetailsViewModel = new SoaLearnerRecordDetailsViewModel { ProfileId = 10, Uln = 1234567890, LearnerName = "John Smith", DateofBirth = DateTime.Now.AddYears(-20), ProviderName = "Barsley College", ProviderUkprn = 456789123, TlevelTitle = "Design, Surveying and Planning for Construction", RegistrationPathwayId = 1, PathwayDisplayName = "Design, Surveying and Planning for Construction (60358300)", PathwayName = "Design, Surveying and Planning for Construction", PathwayCode = "60358300", PathwayGrade = "A*", SpecialismDisplayName = "Building Services Design (ZTLOS003)", SpecialismName = "Building Services Design", SpecialismCode = "ZTLOS003", SpecialismGrade = "None", IsEnglishAndMathsAchieved = true, HasLrsEnglishAndMaths = false, IsSendLearner = true, IndustryPlacementStatus = IndustryPlacementStatus.NotCompleted, HasPathwayResult = false, IsNotWithdrawn = false, IsLearnerRegistered = true, IsIndustryPlacementAdded = true, IsIndustryPlacementCompleted = false, ProviderAddress = new AddressViewModel { AddressId = 10, DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA" }, }; _expectedApiResult = new SoaPrintingResponse { Uln = SoaLearnerRecordDetailsViewModel.Uln, LearnerName = SoaLearnerRecordDetailsViewModel.LearnerName, IsSuccess = true }; InternalApiClient.CreateSoaPrintingRequestAsync(Arg.Any <SoaPrintingRequest>()).Returns(_expectedApiResult); Loader = new StatementOfAchievementLoader(InternalApiClient, Mapper); }
public override void Setup() { _tokenServiceClient = Substitute.For <ITokenServiceClient>(); _configuration = new ResultsAndCertificationConfiguration { ResultsAndCertificationInternalApiSettings = new ResultsAndCertificationInternalApiSettings { Uri = "http://tlevel.api.com" } }; _mockHttpResult = new SoaPrintingResponse { Uln = 1234567891, LearnerName = "Test User", IsSuccess = true }; _model = new SoaPrintingRequest { AddressId = 11, RegistrationPathwayId = 9, Uln = 1111111119, LearnerName = "First 9 Last 9", LearningDetails = new LearningDetails { TLevelTitle = "Design, Surveying and Planning for Construction", Grade = null, Date = "24 April 2021", Core = "Design Surveying and Planning", CoreGrade = "B", OccupationalSpecialism = new List <OccupationalSpecialismDetails> { new OccupationalSpecialismDetails { Specialism = "Surveying and Design for Construction and the Built Environment", Grade = "Merit" } }, IndustryPlacement = "Not completed", EnglishAndMaths = "Met" }, SoaPrintingDetails = new SoaPrintingDetails { Uln = 1111111119, Name = "First 9 Last 9", Dateofbirth = "10 August 1987", ProviderName = "Barnsley College (10000536)", TlevelTitle = "Design, Surveying and Planning for Construction", Core = "Design Surveying and Planning (78945617)", CoreGrade = "B", Specialism = "Surveying and Design for Construction and the Built Environment (ZT456897)", SpecialismGrade = "Merit", EnglishAndMaths = "Achieved minimum standard", IndustryPlacement = "Not completed", ProviderAddress = new Models.Contracts.ProviderAddress.Address { DepartmentName = "Exams Office", OrganisationName = "Barnsley Academy", AddressLine1 = "Main Block", AddressLine2 = "Farm Road", Town = "Barnsley", Postcode = "S70 3DL" } }, PerformedBy = "Test Provider" }; }
public async override Task When() { ActualResult = await Loader.CreateSoaPrintingRequestAsync(ProviderUkprn, SoaLearnerRecordDetailsViewModel); }
public async override Task When() { _result = await _apiClient.CreateSoaPrintingRequestAsync(_model); }