public void Then_Maps_GetFrameworksListItem_Correctly(
            GetFrameworksListItem source)
        {
            var response = (ApprenticeshipCourse)source;

            response.Should().BeEquivalentTo(source,
                                             o => o.Excluding(f => f.IsActiveFramework)
                                             .Excluding(f => f.CurrentFundingCap));
            response.FundingCap.Should().Be(source.CurrentFundingCap);
        }
Пример #2
0
        public void Then_The_Fields_Are_Correctly_Mapped(GetFrameworksListItem source)
        {
            //Arrange
            var actual = (GetFrameworkResponse)source;

            //Assert
            actual.Should().BeEquivalentTo(source, options => options
                                           .Excluding(x => x.FundingPeriods)
                                           .Excluding(x => x.IsActiveFramework)
                                           .Excluding(x => x.CurrentFundingCap)
                                           );
            actual.MaxFunding.Should().Be(source.CurrentFundingCap);
        }
        public void Then_The_Fields_Are_Correctly_Mapped(GetFrameworksListItem source)
        {
            //Arrange
            source.Level = (int)ApprenticeshipLevel.Advanced;

            //Act
            var actual = (TrainingProgramme)source;

            //Assert
            actual.Id.Should().Be(source.Id);
            actual.ApprenticeshipType.Should().Be(TrainingType.Framework);
            actual.Title.Should().Be(source.Title);
            actual.EffectiveFrom.Should().Be(source.EffectiveFrom);
            actual.EffectiveTo.Should().Be(source.EffectiveTo);
            actual.ApprenticeshipLevel.Should().Be(ApprenticeshipLevelMapper.RemapFromInt(source.Level));
            actual.Duration.Should().Be(source.Duration);
            actual.IsActive.Should().BeFalse();
            actual.EducationLevelNumber.Should().Be(source.Level);
        }
Пример #4
0
        public void Then_Maps_The_Fields(GetFrameworksListItem source)
        {
            var actual = (GetFrameworkResponse)source;

            actual.Should().BeEquivalentTo(source);
        }