コード例 #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 override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         IborRateComputation other = (IborRateComputation)obj;
         return(JodaBeanUtils.equal(observation, other.observation));
     }
     return(false);
 }
コード例 #4
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);
        }
コード例 #5
0
        public virtual void test_serialization()
        {
            IborRateComputation test = IborRateComputation.of(GBP_LIBOR_3M, date(2014, 6, 30), REF_DATA);

            assertSerialization(test);
        }