Ejemplo n.º 1
0
        public async Task Then_DeliveryModels_Are_Returned_From_ProviderCoursesApi()
        {
            var fixture = new DeliveryModelServiceTestFixture();

            await fixture.GetDeliveryModels();

            fixture.VerifyResult();
        }
Ejemplo n.º 2
0
        public async Task Then_Default_Is_Returned_When_ProviderCoursesApi_Returns_Unexpected_Result(ProviderCoursesApiResponse apiResponse)
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseFromProviderCoursesApi(apiResponse);

            await fixture.GetDeliveryModels();

            fixture.VerifyResult(DeliveryModelStringTypes.Regular);
        }
Ejemplo n.º 3
0
        public async Task Then_PortableFlexiJob_Is_The_Only_Option_When_Current_Apprenticeship_Is_PortableFlexiJob()
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseHasPortableFlexiJobOptionFromProviderCoursesApi(false)
                          .WithCurrentApprenticeship(DeliveryModelStringTypes.PortableFlexiJob);

            await fixture.GetDeliveryModels();

            fixture.VerifyResult(DeliveryModelStringTypes.PortableFlexiJob);
        }
Ejemplo n.º 4
0
        public async Task Then_FlexiJobAgency_Replaces_Portable_Option_When_Employer_Is_A_FlexiJobAgency()
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseHasPortableFlexiJobOptionFromProviderCoursesApi(true)
                          .WithFlexiJobAgencyEmployer();

            await fixture.GetDeliveryModels();

            fixture.VerifyResult(DeliveryModelStringTypes.Regular, DeliveryModelStringTypes.FlexiJobAgency);
        }
Ejemplo n.º 5
0
        public async Task Then_Regular_Is_The_Only_Option_When_Current_Apprenticeship_Is_Not_Portable_And_Employer_Is_Not_FlexiJobAgency(string currentDeliveryModel)
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseHasPortableFlexiJobOptionFromProviderCoursesApi(true)
                          .WithCurrentApprenticeship(currentDeliveryModel);

            await fixture.GetDeliveryModels();

            fixture.VerifyResult(DeliveryModelStringTypes.Regular);
        }
Ejemplo n.º 6
0
        public async Task Then_No_Options_Are_Available_When_Current_Apprenticeship_Is_PortableFlexiJob_And_Employer_Is_FlexiJobAgency()
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseHasPortableFlexiJobOptionFromProviderCoursesApi(false)
                          .WithFlexiJobAgencyEmployer()
                          .WithCurrentApprenticeship(DeliveryModelStringTypes.PortableFlexiJob);

            await fixture.GetDeliveryModels();

            fixture.VerifyEmptyResult();
        }
Ejemplo n.º 7
0
        public async Task Then_FlexiJobAgency_Functionality_Is_Subject_To_Toggle()
        {
            var fixture = new DeliveryModelServiceTestFixture()
                          .WithResponseHasPortableFlexiJobOptionFromProviderCoursesApi(false)
                          .WithFlexiJobAgencyToggleOff()
                          .WithFlexiJobAgencyEmployer();

            await fixture.GetDeliveryModels();

            fixture.VerifyResult(DeliveryModelStringTypes.Regular);
        }