public static void ManyApproved_And_Very_Large_Cohort_Ready_For_Employer()
        {
            for (var i = 0; i < 15; i++)
            {
                var builder = new CohortBuilder();

                builder
                .WithDefaultEmployerProvider()
                .WithParty(Party.None)
                .WithApprovals(Party.Employer | Party.Provider)
                .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
                .WithApprenticeships(1000);
                builder.Build();
            }

            var builder2 = new CohortBuilder();

            builder2
            .WithDefaultEmployerProvider()
            .WithParty(Party.Employer)
            .WithApprovals(Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeships(1);
            builder2.Build();
        }
        public static void ReusingUlnWhenPendingWithSender()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithTransferSender(8194, "Mega Corp", TransferApprovalStatus.Pending)
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.PendingApproval)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithUln("1000001880")
                                .WithStartOption(new DateTime(2018, 6, 1))
                                );
            builder.Build();


            builder = new CohortBuilder();
            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.Employer)
            .WithLastAction(LastAction.None)
            .WithApprenticeshipPaymentStatus(PaymentStatus.PendingApproval)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithUln("1000001880")
                                .WithStartOption(new DateTime(2018, 9, 1))
                                );
            builder.Build();
        }
        public static void TwoApprovedApprenticeshipsWithSameUln()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithUln("1000001880")
                                .WithStartOption(new DateTime(2018, 6, 1))
                                .WithEndOption(new DateTime(2019, 6, 23))
                                .WithStopOption(new DateTime(2018, 9, 12))
                                );
            builder.Build();


            builder = new CohortBuilder();
            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithUln("1000001880")
                                .WithStartOption(new DateTime(2018, 9, 1))
                                );
            builder.Build();
        }
        public static void ManyApproved()
        {
            for (var i = 0; i < 500; i++)
            {
                var builder = new CohortBuilder();

                if (RandomHelper.GetRandomNumber(10) > 8)
                {
                    builder
                    .WithDefaultEmployerProvider()
                    .WithParty(Party.None)
                    .WithApprovals(Party.Employer | Party.Provider)
                    .WithLastAction(LastAction.Approve)
                    .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
                    .WithApprenticeships(1);
                }
                else
                {
                    DataLockType datalockType = DataLockType.Course;
                    var          r            = RandomHelper.GetRandomNumber(3);
                    if (r == 1)
                    {
                        datalockType = DataLockType.Price;
                    }

                    if (r == 2)
                    {
                        datalockType = DataLockType.MultiPrice;
                    }

                    builder
                    .WithDefaultEmployerProvider()
                    .WithParty(Party.None)
                    .WithApprovals(Party.Employer | Party.Provider)
                    .WithLastAction(LastAction.Approve)
                    .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
                    .WithApprenticeship(cohort =>
                                        new ApprenticeshipBuilder(builder)
                                        .WithDataLock(datalockType));
                }

                builder.Build();
            }
        }
        public static void Scenario_Cohort_Sent_to_new_Provider()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.Provider)
            .WithLastAction(LastAction.Amend)
            .WithApprenticeship(cohort => new ApprenticeshipBuilder(builder));
            builder.Build();
        }
        public static void Scenario_Very_Large_Cohort_Ready_For_Employer()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.Employer)
            .WithApprovals(Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeships(500);
            builder.Build();
        }
        public static void Scenario_Cohort_Sent_to_existing_Provider()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.Provider)
            .WithLastAction(LastAction.Amend)
            .WithLastUpdatedByEmployer("Chris", "*****@*****.**")
            .WithApprenticeship(cohort => new ApprenticeshipBuilder(builder));
            builder.Build();
        }
        public static void Scenario_Cohort_Approved_And_Sent_to_existing_Provider()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.Provider)
            .WithApprovals(Party.Employer)
            .WithLastAction(LastAction.Approve)
            .WithLastUpdatedByEmployer("Chris", "*****@*****.**")
            .WithApprenticeships(1000);
            builder.Build();
        }
        public static void Scenario_Fully_Approved_Cohort()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeships(1);
            builder.Build();
        }
        public static void SingleApproved()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder).WithStartOption(new DateTime(2018, 9, 1)));

            builder.Build();
        }
        public static void CourseDataLockWithoutDataLockSuccess()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithStartOption(ApprenticeshipStartedOption.Started)
                                .WithDataLock(DataLockType.Course)
                                );
            builder.Build();
        }
        public static void Scenario_Fully_Approved_Apprentices_Pending_DataLock_Success()
        {
            var builder = new CohortBuilder();

            builder
            .WithDefaultEmployerProvider()
            .WithParty(Party.None)
            .WithApprovals(Party.Employer | Party.Provider)
            .WithLastAction(LastAction.Approve)
            .WithApprenticeshipPaymentStatus(PaymentStatus.Active)
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithStartOption(ApprenticeshipStartedOption.Started))
            .WithApprenticeship(cohort =>
                                new ApprenticeshipBuilder(builder)
                                .WithStartOption(ApprenticeshipStartedOption.WaitingToStart))
            .Build();
        }