Example #1
0
        public async Task GivenAnEmployerIsApplyingForTheNewApprenticeshipIncentive()
        {
            _createApplicationRequest = Fixture.Create <CreateIncentiveApplicationRequest>();
            const string url = "applications";

            _response = await EmployerIncentiveApi.Post(url, _createApplicationRequest);
        }
        public IncentiveApplicationRequestedSteps(TestContext testContext) : base(testContext)
        {
            _testAccountTable = testContext.TestData.GetOrCreate <Account>();
            var fixture = new Fixture();

            _request = fixture.Build <CreateIncentiveApplicationRequest>().With(x => x.AccountLegalEntityId, _testAccountTable.AccountLegalEntityId).Create();
        }
 public IncentiveApplicationSubmittedSteps(TestContext testContext) : base(testContext)
 {
     _testContext   = testContext;
     _fixture       = new Fixture();
     _createRequest = _fixture.Create <CreateIncentiveApplicationRequest>();
     _submitRequest = _fixture.Create <SubmitIncentiveApplicationRequest>();
     _submitRequest.IncentiveApplicationId = _createRequest.IncentiveApplicationId;
     _submitRequest.AccountId = _createRequest.AccountId;
 }
Example #4
0
        public IncentiveApplicationSubmittedSteps(TestContext testContext) : base(testContext)
        {
            _testContext            = testContext;
            _fixture                = new Fixture();
            _firstApprenticeshipId  = _fixture.Create <long>();
            _secondApprenticeshipId = _firstApprenticeshipId + 1;
            var apprenticeships = new List <IncentiveApplicationApprenticeshipDto>
            {
                _fixture.Build <IncentiveApplicationApprenticeshipDto>().With(p => p.ApprenticeshipId, _firstApprenticeshipId).With(p => p.PlannedStartDate, new DateTime(2021, 5, 1)).With(p => p.EmploymentStartDate, new DateTime(2021, 04, 01)).Create(),
                _fixture.Build <IncentiveApplicationApprenticeshipDto>().With(p => p.ApprenticeshipId, _secondApprenticeshipId).With(p => p.PlannedStartDate, new DateTime(2021, 7, 1)).With(p => p.EmploymentStartDate, new DateTime(2021, 06, 01)).Create()
            };

            _createRequest = _fixture
                             .Build <CreateIncentiveApplicationRequest>()
                             .With(r => r.Apprenticeships, apprenticeships)
                             .Create();
            _submitRequest = _fixture.Build <SubmitIncentiveApplicationRequest>().With(r => r.DateSubmitted, new DateTime(2021, 5, 31)).Create();
            _submitRequest.IncentiveApplicationId = _createRequest.IncentiveApplicationId;
            _submitRequest.AccountId = _createRequest.AccountId;
        }
 public IncentiveApplicationCreatedSteps(TestContext testContext) : base(testContext)
 {
     _testContext = testContext;
     _fixture     = new Fixture();
     _request     = _fixture.Create <CreateIncentiveApplicationRequest>();
 }
        public async Task <IActionResult> CreateIncentiveApplication([FromBody] CreateIncentiveApplicationRequest request)
        {
            await SendCommandAsync(new CreateIncentiveApplicationCommand(request.IncentiveApplicationId, request.AccountId, request.AccountLegalEntityId, request.Apprenticeships));

            return(Created($"/applications/{request.IncentiveApplicationId}", null));
        }