public override void Given() { ProfileId = 11; _mockLearnerDetails = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId, Uln = 1234567890, LearnerName = "John Smith", DateofBirth = DateTime.Now.AddYears(-20), ProviderName = "Barsley College", TlevelTitle = "Design, Surveying and Planning for Construction", PathwayName = "Design, Surveying and Planning for Construction(60358300)", PathwayGrade = "A*", SpecialismName = "Building Services Design (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 { DepartmentName = "Operations", OrganisationName = "College Ltd", AddressLine1 = "10, House", AddressLine2 = "Street", Town = "Birmingham", Postcode = "B1 1AA" }, }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_mockLearnerDetails); }
public override void Given() { ProfileId = 11; SoaLearnerRecordDetailsViewModel = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_mockLearnerDetails); }
public void Then_Expected_Methods_AreCalled() { StatementOfAchievementLoader.Received(1).FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()); CacheService.Received(1).SetAsync(CacheKey, ViewModel); CacheService.Received(1).SetAsync(CacheKey, Arg.Is<RequestSoaUlnNotFoundViewModel>(x => x.Uln == ViewModel.SearchUln), Common.Enum.CacheExpiryTime.XSmall); }
public override void Given() { ProfileId = 11; _mockLearnerDetails = new RequestSoaAlreadySubmittedViewModel { PathwayStatus = RegistrationPathwayStatus.Active }; StatementOfAchievementLoader.GetPrintRequestSnapshotAsync(ProviderUkprn, ProfileId, PathwayId).Returns(_mockLearnerDetails); }
public void Then_Expected_Methods_Called() { StatementOfAchievementLoader.Received(1).CreateSoaPrintingRequestAsync(ProviderUkprn, _mockLearnerDetails); CacheService.Received(1).SetAsync(string.Concat(CacheKey, Constants.RequestSoaConfirmation), Arg.Is <SoaConfirmationViewModel> (x => x.Name == _mockLearnerDetails.LearnerName && x.Uln == _mockLearnerDetails.Uln), CacheExpiryTime.XSmall); }
public override void Given() { ViewModel = new RequestSoaUniqueLearnerNumberViewModel { SearchUln = "1234567891" }; _soaLearnerRecord = new FindSoaLearnerRecord { Uln = 1234567891, LearnerName = "Test Name", DateofBirth = DateTime.UtcNow.AddYears(-30), ProviderName = "Provider (1234567)", TlevelTitle = "Title", Status = Common.Enum.RegistrationPathwayStatus.Active }; StatementOfAchievementLoader.FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()).Returns(_soaLearnerRecord); }
public override void Given() { ViewModel = new RequestSoaUniqueLearnerNumberViewModel { SearchUln = "1234567891" }; _soaLearnerRecord = new FindSoaLearnerRecord { ProfileId = 11, Uln = 1234567891, LearnerName = "Test Name", DateofBirth = DateTime.UtcNow.AddYears(-30), ProviderName = "Provider (1234567)", TlevelTitle = "Title", Status = Common.Enum.RegistrationPathwayStatus.Withdrawn, HasPathwayResult = false, IndustryPlacementStatus = Common.Enum.IndustryPlacementStatus.NotCompleted, IsIndustryPlacementAdded = true }; StatementOfAchievementLoader.FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()).Returns(_soaLearnerRecord); }
public void Then_Expected_Methods_AreCalled() { StatementOfAchievementLoader.Received(1).FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()); CacheService.Received(1).SetAsync(CacheKey, ViewModel); CacheService.Received(1).SetAsync(CacheKey, Arg.Is <RequestSoaUlnNotWithdrawnViewModel>(x => x.Uln == _soaLearnerRecord.Uln && x.LearnerName == _soaLearnerRecord.LearnerName && x.DateofBirth == _soaLearnerRecord.DateofBirth && x.ProviderName == _soaLearnerRecord.ProviderName && x.TLevelTitle == _soaLearnerRecord.TlevelTitle ), Common.Enum.CacheExpiryTime.XSmall); }
public override void Given() { ProfileId = 11; ResultsAndCertificationConfiguration.SoaRerequestInDays = 21; _mockLearnerDetails = new RequestSoaAlreadySubmittedViewModel { PathwayStatus = RegistrationPathwayStatus.Withdrawn, RequestedOn = DateTime.Today.AddMonths(-1) }; 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" }, }; _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 Given() { ProfileId = 11; _mockLearnerDetails = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId, LearnerName = "John Smith", IsLearnerRegistered = false, IsNotWithdrawn = true, IsIndustryPlacementAdded = false, }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_mockLearnerDetails); }
public override void Given() { _profileId = 11; _mockLearnerDetails = new SoaLearnerRecordDetailsViewModel { ProfileId = _profileId, IsLearnerRegistered = true, IsNotWithdrawn = false, IsIndustryPlacementAdded = true, HasPathwayResult = true, IsIndustryPlacementCompleted = true, LastPrintRequestedDate = DateTime.UtcNow }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, _profileId).Returns(_mockLearnerDetails); }
public override void Given() { ProfileId = 11; _mockLearnerDetails = new SoaLearnerRecordDetailsViewModel { ProfileId = ProfileId, Uln = 1234567890, LearnerName = "John Smith", IsEnglishAndMathsAchieved = true, HasLrsEnglishAndMaths = false, IsSendLearner = true, IndustryPlacementStatus = IndustryPlacementStatus.Completed, HasPathwayResult = true, IsNotWithdrawn = false, IsLearnerRegistered = true, IsIndustryPlacementAdded = true, IsIndustryPlacementCompleted = true, }; StatementOfAchievementLoader.GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId).Returns(_mockLearnerDetails); }
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 void Then_Expected_Methods_AreCalled() { StatementOfAchievementLoader.Received(1).GetPrintRequestSnapshotAsync(ProviderUkprn, ProfileId, PathwayId); }
public void Then_Expected_Methods_Called() { StatementOfAchievementLoader.Received(1).CreateSoaPrintingRequestAsync(ProviderUkprn, _mockLearnerDetails); }
public override void Given() { ProfileId = 11; StatementOfAchievementLoader.GetPrintRequestSnapshotAsync(ProviderUkprn, ProfileId, PathwayId).Returns(_mockLearnerDetails); }
public override void Given() { ViewModel = new RequestSoaUniqueLearnerNumberViewModel { SearchUln = "1234567891" }; _soaLearnerRecord = null; StatementOfAchievementLoader.FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()).Returns(_soaLearnerRecord); }
public void Then_Expected_Methods_AreCalled() { StatementOfAchievementLoader.Received(1).GetSoaLearnerRecordDetailsAsync(ProviderUkprn, ProfileId); }
public void Then_Expected_Methods_AreCalled() { StatementOfAchievementLoader.Received(1).FindSoaLearnerRecordAsync(ProviderUkprn, ViewModel.SearchUln.ToLong()); CacheService.Received(1).SetAsync(CacheKey, ViewModel); CacheService.Received(1).RemoveAsync <RequestSoaUniqueLearnerNumberViewModel>(CacheKey); }