示例#1
0
        public void IsOutOfScopeMeetsExpectation(TypeOfNotionalNVQLevelV2 candidate, bool expectation)
        {
            // arrange
            var sut = NewRule();

            // act
            var result = sut.IsOutOfScope(candidate);

            // assert
            Assert.Equal(expectation, result);
        }
示例#2
0
        public void HasDisqualifyingMaximumLevelMeetsExpectation(string candidate, TypeOfNotionalNVQLevelV2 notionalLevel, bool expectation)
        {
            // arrange
            var sut      = NewRule();
            var mockItem = new Mock <IEsfEligibilityRuleSectorSubjectAreaLevel>();

            mockItem
            .SetupGet(x => x.MaxLevelCode)
            .Returns(candidate);

            // act
            var result = sut.HasDisqualifyingMaximumLevel(mockItem.Object, notionalLevel);

            // assert
            Assert.Equal(expectation, result);
        }
示例#3
0
        public void GetNotionalNVQLevelV2MeetsExpectation(string candidate, TypeOfNotionalNVQLevelV2 expectation)
        {
            // arrange
            var sut      = NewRule();
            var mockItem = new Mock <ILARSLearningDelivery>();

            mockItem
            .SetupGet(x => x.NotionalNVQLevelv2)
            .Returns(candidate);

            // act
            var result = sut.GetNotionalNVQLevelV2(mockItem.Object);

            // assert
            Assert.Equal(expectation, result);
        }
 /// <summary>
 /// Determines whether [has disqualifying maximum level] [the specified subject area level].
 /// the subject areas level is prechecked for usability
 /// </summary>
 /// <param name="subjectAreaLevel">The subject area level.</param>
 /// <param name="notionalNVQLevel2">The notional NVQ level2.</param>
 /// <returns>
 ///   <c>true</c> if [has disqualifying maximum level] [the specified subject area level]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasDisqualifyingMaximumLevel(IEsfEligibilityRuleSectorSubjectAreaLevel subjectAreaLevel, TypeOfNotionalNVQLevelV2 notionalNVQLevel2) =>
 notionalNVQLevel2 > subjectAreaLevel.MaxLevelCode.AsNotionalNVQLevelV2();
 /// <summary>
 /// Determines whether [has disqualifying notional level] [the specified notional NVQ level2].
 /// </summary>
 /// <param name="notionalNVQLevel2">The notional NVQ level2.</param>
 /// <returns>
 ///   <c>true</c> if [has disqualifying notional level] [the specified notional NVQ level2]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsOutOfScope(TypeOfNotionalNVQLevelV2 notionalNVQLevel2) =>
 notionalNVQLevel2 == TypeOfNotionalNVQLevelV2.OutOfScope;
 /// <summary>
 /// Determines whether [is disqualifying subject area level] [the specified subject area level].
 /// the subject areas level is prechecked for usability
 /// </summary>
 /// <param name="subjectAreaLevel">The subject area level.</param>
 /// <param name="notionalNVQLevel2">The notional NVQ level2.</param>
 /// <returns>
 ///   <c>true</c> if [is disqualifying subject area level] [the specified subject area level]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsDisqualifyingSubjectAreaLevel(IEsfEligibilityRuleSectorSubjectAreaLevel subjectAreaLevel, TypeOfNotionalNVQLevelV2 notionalNVQLevel2) =>
 !IsOutOfScope(notionalNVQLevel2) &&
 (HasDisqualifyingMinimumLevel(subjectAreaLevel, notionalNVQLevel2) ||
  HasDisqualifyingMaximumLevel(subjectAreaLevel, notionalNVQLevel2));