//------------------------------------------------------------------------- public virtual void test_NONE() { PeriodAdjustment test = PeriodAdjustment.NONE; assertEquals(test.Period, Period.ZERO); assertEquals(test.Adjustment, BDA_NONE); assertEquals(test.ToString(), "P0D"); }
public virtual void test_ofLastBusinessDay() { PeriodAdjustment test = PeriodAdjustment.ofLastBusinessDay(Period.ofMonths(3), BDA_FOLLOW_SAT_SUN); assertEquals(test.Period, Period.ofMonths(3)); assertEquals(test.AdditionConvention, LAST_BUSINESS_DAY); assertEquals(test.Adjustment, BDA_FOLLOW_SAT_SUN); assertEquals(test.ToString(), "P3M with LastBusinessDay then apply Following using calendar Sat/Sun"); }
//------------------------------------------------------------------------- public virtual void test_of_additionConventionNone() { PeriodAdjustment test = PeriodAdjustment.of(Period.of(1, 2, 3), PAC_NONE, BDA_NONE); assertEquals(test.Period, Period.of(1, 2, 3)); assertEquals(test.AdditionConvention, PAC_NONE); assertEquals(test.Adjustment, BDA_NONE); assertEquals(test.ToString(), "P1Y2M3D"); }