//------------------------------------------------------------------------- public virtual void test_collectIndices() { InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH); ImmutableSet.Builder <Index> builder = ImmutableSet.builder(); test.collectIndices(builder); assertEquals(builder.build(), ImmutableSet.of(GB_HICP)); }
//------------------------------------------------------------------------- public virtual void coverage() { InflationMonthlyRateComputation test1 = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH); coverImmutableBean(test1); InflationMonthlyRateComputation test2 = InflationMonthlyRateComputation.of(CH_CPI, YearMonth.of(2014, 4), YearMonth.of(2015, 4)); coverBeanEquals(test1, test2); }
public virtual void test_serialization() { InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH); assertSerialization(test); }
public virtual void test_wrongMonthOrder() { assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, END_MONTH, START_MONTH)); assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, START_MONTH)); }
//------------------------------------------------------------------------- public virtual void test_of() { InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH); assertEquals(test.Index, GB_HICP); }