示例#1
0
        //-------------------------------------------------------------------------
        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));
        }
示例#2
0
        //-------------------------------------------------------------------------
        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);
        }
示例#3
0
        public virtual void test_serialization()
        {
            InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH);

            assertSerialization(test);
        }
示例#4
0
 public virtual void test_wrongMonthOrder()
 {
     assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, END_MONTH, START_MONTH));
     assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, START_MONTH));
 }
示例#5
0
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH);

            assertEquals(test.Index, GB_HICP);
        }