public void WhenProgrammeTypeDoesNotMatch_ThenDLOCK_05()
        {
            var validation = new DataLockValidationModel
            {
                PriceEpisode = new PriceEpisode {
                    Identifier = PriceEpisodeIdentifier
                },
                EarningPeriod  = period,
                Apprenticeship = new ApprenticeshipModel
                {
                    Id = 1,
                    ApprenticeshipPriceEpisodes = new List <ApprenticeshipPriceEpisodeModel>
                    {
                        new ApprenticeshipPriceEpisodeModel
                        {
                            Id = 100
                        }
                    },
                    ProgrammeType = 123,
                },
                Aim = new LearningAim
                {
                    ProgrammeType = 124,
                },
            };

            var validator = new ProgrammeTypeValidator();
            var result    = validator.Validate(validation);

            result.DataLockErrorCode.Should().Be(DataLockErrorCode.DLOCK_05);
            result.ApprenticeshipPriceEpisodes.Should().HaveCount(0);
        }
        public void WhenProgrammeTypeMatches_ThenNoDatalock()
        {
            var validation = new DataLockValidationModel
            {
                PriceEpisode = new PriceEpisode {
                    Identifier = PriceEpisodeIdentifier
                },
                EarningPeriod  = period,
                Apprenticeship = new ApprenticeshipModel
                {
                    Id = 1,
                    ApprenticeshipPriceEpisodes = new List <ApprenticeshipPriceEpisodeModel>
                    {
                        new ApprenticeshipPriceEpisodeModel
                        {
                            Id = 100
                        }
                    },
                    ProgrammeType = 123,
                },
                Aim = new LearningAim
                {
                    ProgrammeType = 123,
                },
            };

            var validator = new ProgrammeTypeValidator();
            var result    = validator.Validate(validation);

            result.DataLockErrorCode.Should().BeNull();
            result.ApprenticeshipPriceEpisodes.Should().HaveCount(1);
            result.ApprenticeshipPriceEpisodes[0].Id.Should().Be(100);
        }