Пример #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);
        }
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         InflationMonthlyRateComputation other = (InflationMonthlyRateComputation)obj;
         return(JodaBeanUtils.equal(startObservation, other.startObservation) && JodaBeanUtils.equal(endObservation, other.endObservation));
     }
     return(false);
 }
Пример #4
0
        public virtual void test_serialization()
        {
            InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH);

            assertSerialization(test);
        }
Пример #5
0
 public virtual void test_wrongMonthOrder()
 {
     assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, END_MONTH, START_MONTH));
     assertThrowsIllegalArg(() => InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, START_MONTH));
 }
Пример #6
0
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            InflationMonthlyRateComputation test = InflationMonthlyRateComputation.of(GB_HICP, START_MONTH, END_MONTH);

            assertEquals(test.Index, GB_HICP);
        }