public CannotConfirmSteps(TestContext context, RegisteredUserContext userContext) : base(context)
 {
     _context          = context;
     _userContext      = userContext;
     _apprenticeshipId = HashedId.Create(1235, _context.Hashing);
     _backlink         = $"/apprenticeships/{_apprenticeshipId.Hashed}";
 }
        public ConfirmRolesAndResponsibilitiesSteps(TestContext context, RegisteredUserContext userContext) : base(context)
        {
            _context          = context;
            _userContext      = userContext;
            _apprenticeshipId = HashedId.Create(1235, _context.Hashing);

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingAnyMethod()
                .WithPath($"/apprentices/*/apprenticeships/{_apprenticeshipId.Id}/rolesandresponsibilitiesconfirmation"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200));
        }
        public HowYourApprenticeshipWillBeDeliveredSteps(TestContext context, RegisteredUserContext userContext) : base(context)
        {
            _context          = context;
            _userContext      = userContext;
            _apprenticeshipId = HashedId.Create(1235, _context.Hashing);

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingPost()
                .WithPath($"/apprentices/*/apprenticeships/{_apprenticeshipId.Id}/howapprenticeshipwillbedeliveredconfirmation"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200));
        }
        public ConfirmYourTrainingProviderSteps(TestContext context) : base(context)
        {
            _context              = context;
            _apprenticeshipId     = HashedId.Create(1397, _context.Hashing);
            _trainingProviderName = "My Test Company";

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingAnyMethod()
                .WithPath("/apprentices/*/apprenticeships/*/trainingproviderconfirmation"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200));
        }
Example #5
0
        public TransactionCompleteSteps(TestContext context, RegisteredUserContext userContext) : base(context)
        {
            _context          = context;
            _userContext      = userContext;
            _apprenticeshipId = HashedId.Create(1235, _context.Hashing);

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingGet()
                .WithPath($"/apprentices/*/apprenticeships/{_apprenticeshipId.Id}"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200)
                         .WithBodyAsJson(new { Id = _apprenticeshipId.Id, CourseName = "Test Course" }));
        }
Example #6
0
        public ConfirmYourEmployerSteps(TestContext context, RegisteredUserContext userContext) : base(context)
        {
            _context          = context;
            _userContext      = userContext;
            _apprenticeshipId = HashedId.Create(1235, _context.Hashing);
            _employerName     = "My Test Company";

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingAnyMethod()
                .WithPath($"/apprentices/*/apprenticeships/{_apprenticeshipId.Id}/employerconfirmation"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200));
        }
        public YourApprenticeshipDetailsSteps(TestContext context, RegisteredUserContext userContext) : base(context)
        {
            _context          = context;
            _userContext      = userContext;
            _apprenticeshipId = HashedId.Create(1235, _context.Hashing);

            _courseName       = "My Test Course Name";
            _courseLevel      = 3;
            _courseOption     = (string)null;
            _durationInMonths = 19;
            _plannedStartDate = new DateTime(2021, 03, 12);
            _plannedEndDate   = new DateTime(2022, 09, 15);

            _context.OuterApi.MockServer.Given(
                Request.Create()
                .UsingAnyMethod()
                .WithPath($"/apprentices/*/apprenticeships/{_apprenticeshipId.Id}/apprenticeshipdetailsconfirmation"))
            .RespondWith(Response.Create()
                         .WithStatusCode(200));
        }
 public static string MyApprenticshipPage(HashedId forApprenticeship)
 => $"/apprenticeships/{forApprenticeship.Hashed}";
Example #9
0
 public MyApprenticeshipsSteps(TestContext context, RegisteredUserContext userContext) : base(context)
 {
     _context          = context;
     _userContext      = userContext;
     _apprenticeshipId = HashedId.Create(1235, _context.Hashing);
 }
 public static HashedId NewHashedId(long value)
 => HashedId.Create(Hashing.HashValue(value), Hashing);
 public static HashedId NewHashedId(string value)
 => HashedId.Create(value, Hashing);