Пример #1
0
        //-------------------------------------------------------------------------
        public virtual void test_collectIndices()
        {
            IborRateComputation test = IborRateComputation.of(GBP_LIBOR_3M, date(2014, 6, 30), REF_DATA);

            ImmutableSet.Builder <Index> builder = ImmutableSet.builder();
            test.collectIndices(builder);
            assertEquals(builder.build(), ImmutableSet.of(GBP_LIBOR_3M));
        }
Пример #2
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            IborRateComputation test = IborRateComputation.of(GBP_LIBOR_3M, date(2014, 6, 30), REF_DATA);

            coverImmutableBean(test);
            IborRateComputation test2 = IborRateComputation.of(GBP_LIBOR_1M, date(2014, 7, 30), REF_DATA);

            coverBeanEquals(test, test2);
        }
Пример #3
0
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            IborRateComputation  test     = IborRateComputation.of(USD_LIBOR_3M, date(2016, 2, 18), REF_DATA);
            IborIndexObservation obs      = IborIndexObservation.of(USD_LIBOR_3M, date(2016, 2, 18), REF_DATA);
            IborRateComputation  expected = IborRateComputation.of(obs);

            assertEquals(test, expected);
            assertEquals(test.Currency, USD);
            assertEquals(test.Index, obs.Index);
            assertEquals(test.FixingDate, obs.FixingDate);
            assertEquals(test.EffectiveDate, obs.EffectiveDate);
            assertEquals(test.MaturityDate, obs.MaturityDate);
            assertEquals(test.YearFraction, obs.YearFraction);
        }
Пример #4
0
        public virtual void test_serialization()
        {
            IborRateComputation test = IborRateComputation.of(GBP_LIBOR_3M, date(2014, 6, 30), REF_DATA);

            assertSerialization(test);
        }