public override void Given() { _expectedAddress = new Address { AddressId = 1, DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA" }; _expectedSnapshotDetails = new SoaPrintingDetails { Uln = 1234567890, Name = "First 1 Last 1", Dateofbirth = "01 January 2006", ProviderName = "Barnsley College (10000536)", TlevelTitle = "T Level in Healthcare Science", Core = "Healthcare Science (10923456)", CoreGrade = "B", Specialism = "Optical Care Services (38234567)", SpecialismGrade = "None", EnglishAndMaths = "Achieved minimum standard (Data from the Learning Records Service - LRS)", IndustryPlacement = "Placement completed", ProviderAddress = _expectedAddress }; _expectedApiResult = new PrintRequestSnapshot { RegistrationPathwayStatus = RegistrationPathwayStatus.Withdrawn, RequestedBy = "John Smith", RequestedOn = DateTime.Today, RequestDetails = JsonConvert.SerializeObject(_expectedSnapshotDetails) }; InternalApiClient.GetPrintRequestSnapshotAsync(ProviderUkprn, ProfileId, PathwayId).Returns(_expectedApiResult); }
public override void Given() { ProfileId = 11; ResultsAndCertificationConfiguration.SoaRerequestInDays = 21; _address = new Address { AddressId = 1, DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA" }; _soaPrintDetails = new SoaPrintingDetails { Uln = 1234567890, Name = "John Smith", Dateofbirth = "09 July 2021", ProviderName = "Barsley College (569874567)", TlevelTitle = "Design, Surveying and Planning for Construction", Core = "Design, Surveying and Planning for Construction (60358300)", CoreGrade = "A*", Specialism = "Building Services Design (ZTLOS003)", SpecialismGrade = "None", EnglishAndMaths = "Achieved minimum standard", IndustryPlacement = "Placement completed", ProviderAddress = _address }; _mockLearnerDetails = new RequestSoaAlreadySubmittedViewModel { PathwayStatus = RegistrationPathwayStatus.Withdrawn, RequestedOn = DateTime.Today, RequestedBy = "John Smith", SnapshotDetails = _soaPrintDetails }; StatementOfAchievementLoader.GetPrintRequestSnapshotAsync(ProviderUkprn, ProfileId, PathwayId).Returns(_mockLearnerDetails); }
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" }, }; _expectedLearningDetails = new LearningDetails { TLevelTitle = SoaLearnerRecordDetailsViewModel.TlevelTitle, Grade = null, Date = DateTime.UtcNow.ToSoaFormat(), Core = SoaLearnerRecordDetailsViewModel.PathwayName, CoreGrade = SoaLearnerRecordDetailsViewModel.PathwayGrade, OccupationalSpecialism = new List <OccupationalSpecialismDetails> { new OccupationalSpecialismDetails { Specialism = SoaLearnerRecordDetailsViewModel.SpecialismName, Grade = SoaLearnerRecordDetailsViewModel.SpecialismGrade } }, IndustryPlacement = SoaLearnerRecordDetailsViewModel.IsIndustryPlacementCompleted ? Constants.IndustryPlacementCompleted : Constants.IndustryPlacementNotCompleted, EnglishAndMaths = SoaLearnerRecordDetailsViewModel.IsEnglishAndMathsAchieved ? Constants.EnglishAndMathsMet : Constants.EnglishAndMathsNotMet }; _expectedSoaPrintingDetails = new SoaPrintingDetails { Uln = SoaLearnerRecordDetailsViewModel.Uln, Name = SoaLearnerRecordDetailsViewModel.LearnerName, Dateofbirth = SoaLearnerRecordDetailsViewModel.DateofBirth.ToDobFormat(), ProviderName = SoaLearnerRecordDetailsViewModel.ProviderDisplayName, TlevelTitle = SoaLearnerRecordDetailsViewModel.TlevelTitle, Core = SoaLearnerRecordDetailsViewModel.PathwayDisplayName, CoreGrade = SoaLearnerRecordDetailsViewModel.PathwayGrade, Specialism = SoaLearnerRecordDetailsViewModel.SpecialismDisplayName, SpecialismGrade = SoaLearnerRecordDetailsViewModel.SpecialismGrade, EnglishAndMaths = SoaLearnerRecordDetailsViewModel.GetEnglishAndMathsStatusDisplayText, IndustryPlacement = SoaLearnerRecordDetailsViewModel.GetIndustryPlacementDisplayText, ProviderAddress = new Models.Contracts.ProviderAddress.Address { AddressId = SoaLearnerRecordDetailsViewModel.ProviderAddress.AddressId, DepartmentName = SoaLearnerRecordDetailsViewModel.ProviderAddress.DepartmentName, OrganisationName = SoaLearnerRecordDetailsViewModel.ProviderAddress.OrganisationName, AddressLine1 = SoaLearnerRecordDetailsViewModel.ProviderAddress.AddressLine1, AddressLine2 = SoaLearnerRecordDetailsViewModel.ProviderAddress.AddressLine2, Town = SoaLearnerRecordDetailsViewModel.ProviderAddress.Town, Postcode = SoaLearnerRecordDetailsViewModel.ProviderAddress.Postcode } }; }