public override void Given() { var mockresult = new SelectToReviewPageViewModel(); TlevelLoader.GetTlevelsToReviewByUkprnAsync(Arg.Any <long>()) .Returns(mockresult); }
public override void Given() { expectedResult.PathwayStatusId = (int)TlevelReviewStatus.Queried; TlevelLoader.GetQueryTlevelViewModelAsync(ukprn, pathwayId) .Returns(expectedResult); }
public override void Given() { pathwayId = 10; TlevelLoader.GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId) .Returns(viewModel); }
public override void Given() { InputModel = new ConfirmTlevelViewModel { PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation, PathwayId = pathwayId }; TlevelLoader.ConfirmTlevelAsync(InputModel).Returns(false); }
public override void Given() { PathwayId = 99; InputViewModel = new TlevelQueryViewModel { PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation, PathwayId = PathwayId }; TlevelLoader.ReportIssueAsync(InputViewModel).Returns(false); }
public override void Given() { InputViewModel = new TlevelQueryViewModel { PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation }; Controller.ModelState.AddModelError("Query", "Please enter a query."); TlevelLoader.GetQueryTlevelViewModelAsync(Ukprn, PathwayId).Returns(ExpectedResult); }
public override void Given() { pathwayId = 10; viewModel = new ConfirmTlevelViewModel { PathwayStatusId = (int)TlevelReviewStatus.Confirmed }; TlevelLoader.GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId) .Returns(viewModel); }
public override void Given() { Id = 1; TempData["IsRedirect"] = true; expectedResult = new TlevelConfirmationViewModel { PathwayId = 1, ShowMoreTlevelsToReview = true, TlevelConfirmationText = "Success", TlevelTitle = "Title", IsQueried = true }; TlevelLoader.GetTlevelConfirmationDetailsAsync(ukprn, Id) .Returns(expectedResult); }
public override void Given() { var mockresult = new YourTlevelsViewModel { IsAnyReviewPending = false, ConfirmedTlevels = new List <YourTlevelViewModel>(), QueriedTlevels = new List <YourTlevelViewModel>() }; TlevelLoader.GetYourTlevelsViewModel(Arg.Any <long>()) .Returns(mockresult); }
public override void Given() { pathwayId = 10; isBack = true; expectedModel = new ConfirmTlevelViewModel { PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation }; TlevelLoader.GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId) .Returns(expectedModel); }
public override void Given() { ApiClientResponse = new List <AwardingOrganisationPathwayStatus> { new AwardingOrganisationPathwayStatus { Id = 1, PathwayId = PathwayId, TlevelTitle = "Tlevel Title", StatusId = 2 }, }; InternalApiClient.GetAllTlevelsByUkprnAsync(Ukprn).Returns(ApiClientResponse); Loader = new TlevelLoader(InternalApiClient, Mapper); }
public override void Given() { var mockresult = new List <YourTlevelViewModel> { new YourTlevelViewModel { PathwayId = 1, TlevelTitle = "RouteName1: Pathway1" }, new YourTlevelViewModel { PathwayId = 2, TlevelTitle = "RouteName2: Pathway2" } }; TlevelLoader.GetTlevelsByStatusIdAsync(Arg.Any <long>(), Arg.Any <int>()) .Returns(mockresult); }
public override void Given() { mockresult = new TLevelDetailsViewModel { PageTitle = "Tlevel Details", PathwayName = "Education", ShowSomethingIsNotRight = true, RouteName = "Digital Education", Specialisms = new List <string> { "Specialism1", "Specialism2" } }; TlevelLoader.GetTlevelDetailsByPathwayIdAsync(ukPrn, id) .Returns(mockresult); }
public override void Given() { PathwayId = 99; ExpectedResult = false; ConfirmTlevelViewModel = new ConfirmTlevelViewModel { PathwayId = PathwayId, TqAwardingOrganisationId = PathwayId }; VerifyTlevelDetails = new VerifyTlevelDetails { Id = PathwayId, TqAwardingOrganisationId = PathwayId, PathwayStatusId = StatusId }; Mapper.Map <VerifyTlevelDetails>(ConfirmTlevelViewModel).Returns(VerifyTlevelDetails); InternalApiClient.VerifyTlevelAsync(VerifyTlevelDetails).Returns(ExpectedResult); Loader = new TlevelLoader(InternalApiClient, Mapper); }
public override void Given() { var mockresult = new YourTlevelsViewModel { IsAnyReviewPending = true, ConfirmedTlevels = new List <YourTlevelViewModel> { new YourTlevelViewModel { PathwayId = expectedPathwayId, TlevelTitle = expectedTlevelTitle } }, QueriedTlevels = new List <YourTlevelViewModel>() }; TlevelLoader.GetYourTlevelsViewModel(Arg.Any <long>()) .Returns(mockresult); }
public override void Given() { selectedPathwayId = 99; mockresult = new SelectToReviewPageViewModel { TlevelsToReview = new List <TlevelToReviewViewModel> { new TlevelToReviewViewModel { PathwayId = 1, TlevelTitle = "Route1: Pathway1" }, } }; TlevelLoader.GetTlevelsToReviewByUkprnAsync(Arg.Any <long>()) .Returns(mockresult); }
public override void Given() { InputModel = new SelectToReviewPageViewModel { SelectedPathwayId = selectedPathwayId }; Controller.ModelState.AddModelError("SelectedPathwayId", "Please select a T level."); mockresult = new SelectToReviewPageViewModel { SelectedPathwayId = selectedPathwayId, TlevelsToReview = new List <TlevelToReviewViewModel> { } }; TlevelLoader.GetTlevelsToReviewByUkprnAsync(Arg.Any <long>()) .Returns(mockresult); }
public override void Given() { pathwayId = 10; expectedModel = new ConfirmTlevelViewModel { TqAwardingOrganisationId = 1, RouteId = 2, PathwayId = pathwayId, PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation, IsEverythingCorrect = true, PathwayName = "Pathway 1", Specialisms = new List <string> { "sp1", "sp2" } }; TlevelLoader.GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId) .Returns(expectedModel); }
public override void Given() { expectedResult = new ConfirmTlevelViewModel { PathwayId = pathwayId, PathwayName = "PathName", RouteId = 5, IsEverythingCorrect = false, PathwayStatusId = 1, TqAwardingOrganisationId = 7, Specialisms = new List <string> { "spl1", "spl2" } }; InputModel = new ConfirmTlevelViewModel { PathwayStatusId = (int)TlevelReviewStatus.AwaitingConfirmation, PathwayId = pathwayId }; TlevelLoader.GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId) .Returns(expectedResult); Controller.ModelState.AddModelError("IsEverythingCorrect", "Select yes if this T Level’s details are correct"); }
public override void Given() { _httpContextAccessor = Substitute.For <IHttpContextAccessor>(); _httpContextAccessor.HttpContext.Returns(new DefaultHttpContext { User = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.GivenName, _givename), new Claim(ClaimTypes.Surname, _surname), new Claim(ClaimTypes.Email, _email) })) }); CreateMapper(); StatusId = (int)TlevelReviewStatus.Queried; TlevelQueryViewModel = new TlevelQueryViewModel { PathwayId = PathwayId, TqAwardingOrganisationId = PathwayId, Query = "Details Queried" }; VerifyTlevelDetails = new VerifyTlevelDetails { Id = PathwayId, TqAwardingOrganisationId = PathwayId, PathwayStatusId = StatusId }; InternalApiClient.VerifyTlevelAsync(VerifyTlevelDetails).Returns(ExpectedResult); Loader = new TlevelLoader(InternalApiClient, Mapper); }
public void Then_Called_Expected_Method() { TlevelLoader.Received(1).GetQueryTlevelViewModelAsync(ukprn, pathwayId); }
public override void Given() { TlevelLoader.GetQueryTlevelViewModelAsync(ukprn, pathwayId) .Returns(expectedResult); }
public void Then_Called_GetTlevelDetailsByPathwayId() { TlevelLoader.Received().GetTlevelDetailsByPathwayIdAsync(ukPrn, id); }
public void Then_Called_Expected_Method() { TlevelLoader.Received(1).GetYourTlevelsViewModel(Arg.Any <long>()); }
public override void Given() { TlevelLoader.GetTlevelDetailsByPathwayIdAsync(ukPrn, id) .Returns(mockresult); }
public override void Given() { TlevelLoader.GetTlevelsByStatusIdAsync(Arg.Any <long>(), Arg.Any <int>()) .Returns(new List <YourTlevelViewModel>()); }
public void Then_Called_Expeccted_Methods() { TlevelLoader.Received().GetTlevelsToReviewByUkprnAsync(ukprn); }
public void Then_Called_Expected_Methods() { TlevelLoader.Received().GetTlevelsByStatusIdAsync(Arg.Any <long>(), (int)TlevelReviewStatus.AwaitingConfirmation); }
public void Then_Called_Expected_Methods() { TlevelLoader.Received(1).GetTlevelConfirmationDetailsAsync(ukprn, Id); }
public void Then_Called_Expected_Methods() { TlevelLoader.Received(1).GetVerifyTlevelDetailsByPathwayIdAsync(ukprn, pathwayId); }