public void ConditionMetLocalAuthority_False_EligibilityNull() { var onsPostCodes = new ONSPostcode[] { new ONSPostcode() { LocalAuthority = "123" } }; NewRule().ConditionMetLocalAuthority(null, onsPostCodes).Should().BeFalse(); }
public void InQualifyingPeriod_True(string startDate, string effectiveFrom, string effectiveTo, string termination) { DateTime learnStartDate = DateTime.Parse(startDate); DateTime effectivefromDate = DateTime.Parse(effectiveFrom); DateTime?effectiveToDate = string.IsNullOrEmpty(effectiveTo) ? (DateTime?)null : DateTime.Parse(effectiveTo); DateTime?terminationDate = string.IsNullOrEmpty(termination) ? (DateTime?)null : DateTime.Parse(termination); var onsPostCode = new ONSPostcode() { EffectiveFrom = effectivefromDate, EffectiveTo = effectiveToDate, Termination = terminationDate }; NewRule().CheckQualifyingPeriod(learnStartDate, onsPostCode).Should().BeTrue(); }
public void ConditionMetONSPostcode_False(string dd22, string effectiveFrom, string effectiveTo, string termination) { DateTime?dateDD22 = string.IsNullOrEmpty(dd22) ? (DateTime?)null : DateTime.Parse(dd22); DateTime effectiveFromDate = DateTime.Parse(effectiveFrom); DateTime?effectiveToDate = string.IsNullOrEmpty(effectiveTo) ? (DateTime?)null : DateTime.Parse(effectiveTo); DateTime?dateOfTermination = string.IsNullOrEmpty(termination) ? (DateTime?)null : DateTime.Parse(termination); var onsPostCodes = new ONSPostcode[] { new ONSPostcode() { EffectiveFrom = effectiveFromDate, EffectiveTo = effectiveToDate, Termination = dateOfTermination } }; NewRule().ConditionMetONSPostcode(dateDD22, onsPostCodes).Should().BeFalse(); }
public void ConditionMetLocalAuthority_False() { var localAuthorityEligibility = new List <EsfEligibilityRuleLocalAuthority> { new EsfEligibilityRuleLocalAuthority { Code = "123" } }; var onsPostCodes = new ONSPostcode[] { new ONSPostcode() { LocalAuthority = "123" } }; NewRule().ConditionMetLocalAuthority(localAuthorityEligibility, onsPostCodes).Should().BeFalse(); }
public void ConditionMetPartnership_False(string code, string lep1, string lep2) { var partnershipEligibility = new List <EsfEligibilityRuleLocalEnterprisePartnership> { new EsfEligibilityRuleLocalEnterprisePartnership { Code = code } }; var onsPostCodes = new ONSPostcode[] { new ONSPostcode() { Lep1 = lep1, Lep2 = lep2 } }; NewRule().ConditionMetPartnership(partnershipEligibility, onsPostCodes).Should().BeFalse(); }