public void Then_The_Typical_Duration_Is_Used(int notDuration, int duration) { //Arrange / Act var standard = new TestStandardResponse { ApprenticeshipFunding = new List <ApprenticeshipFunding> { new ApprenticeshipFunding { EffectiveFrom = DateTime.UtcNow.AddDays(-10), EffectiveTo = DateTime.UtcNow.AddDays(-9), Duration = notDuration }, new ApprenticeshipFunding { EffectiveFrom = DateTime.UtcNow.AddDays(-1), EffectiveTo = null, Duration = duration } } }; //Assert standard.TypicalDuration.Should().Be(duration); }
public void Then_The_Future_Price_Is_Not_Used(int fundingPrice, int notFundingPrice) { //Arrange / Act var standard = new TestStandardResponse { ApprenticeshipFunding = new List <ApprenticeshipFunding> { new ApprenticeshipFunding { EffectiveFrom = DateTime.UtcNow.AddDays(-10), EffectiveTo = DateTime.UtcNow.AddDays(9), MaxEmployerLevyCap = fundingPrice }, new ApprenticeshipFunding { EffectiveFrom = DateTime.UtcNow.AddDays(4), EffectiveTo = null, MaxEmployerLevyCap = notFundingPrice } } }; //Assert standard.MaxFunding.Should().Be(fundingPrice); }
public void And_EffectiveFrom_Today_And_No_EffectiveTo_Then_True(TestStandardResponse standard) { standard.StandardDates.EffectiveFrom = DateTime.UtcNow; standard.StandardDates.EffectiveTo = null; standard.IsActive.Should().BeTrue(); }
public void And_EffectiveTo_Before_Today_Then_False(TestStandardResponse standard) { standard.StandardDates.EffectiveFrom = DateTime.UtcNow; standard.StandardDates.EffectiveTo = DateTime.UtcNow.AddDays(-1); standard.IsActive.Should().BeFalse(); }
public void Then_If_An_Effective_Date_Is_Provided_The_Funding_Price_As_At_That_Date_Is_Used(int notFundingPrice, int fundingPrice) { var effectiveDate = DateTime.UtcNow; //Arrange / Act var standard = new TestStandardResponse { ApprenticeshipFunding = new List <ApprenticeshipFunding> { new ApprenticeshipFunding { EffectiveFrom = effectiveDate.AddDays(-10), EffectiveTo = effectiveDate.AddDays(-9), MaxEmployerLevyCap = notFundingPrice }, new ApprenticeshipFunding { EffectiveFrom = effectiveDate.AddDays(-1), EffectiveTo = null, MaxEmployerLevyCap = fundingPrice } } }; //Assert standard.MaxFundingOn(effectiveDate).Should().Be(fundingPrice); }
public void Then_If_There_Is_Null_Available_Funding_Zero_Is_Returned_For_TypicalDuration() { //Arrange/Act var standard = new TestStandardResponse { ApprenticeshipFunding = null }; //Assert standard.TypicalDuration.Should().Be(0); }
public void Then_If_There_Is_Null_Funding_Zero_Is_Returned() { //Arrange/Act var standard = new TestStandardResponse { ApprenticeshipFunding = null }; //Assert standard.MaxFunding.Should().Be(0); }
public void Then_If_There_Is_No_Available_Funding_Zero_Is_Returned_For_MaxFunding() { //Arrange/Act var standard = new TestStandardResponse { ApprenticeshipFunding = new List <ApprenticeshipFunding>(), }; //Assert standard.MaxFunding.Should().Be(0); }
public void Then_The_ApprenticeshipFunding_Price_With_No_EffectiveTo_Date_And_Has_A_From_Date_In_The_Past_Is_Used(int fundingPrice) { //Arrange / Act var standard = new TestStandardResponse { ApprenticeshipFunding = new List <ApprenticeshipFunding> { new ApprenticeshipFunding { EffectiveFrom = DateTime.UtcNow.AddDays(-1), EffectiveTo = null, MaxEmployerLevyCap = fundingPrice } } }; //Assert standard.MaxFunding.Should().Be(fundingPrice); }
public void And_StandardDates_Are_Not_Available_Then_False(TestStandardResponse standard) { standard.StandardDates = null; standard.IsActive.Should().BeFalse(); }