//-------------------------------------------------------------------------
        public virtual void test_of_List()
        {
            IborAveragedRateComputation test = IborAveragedRateComputation.of(FIXINGS);

            assertEquals(test.Fixings, FIXINGS);
            assertEquals(test.TotalWeight, 2d, 0d);
        }
        //-------------------------------------------------------------------------
        public virtual void test_collectIndices()
        {
            IborAveragedRateComputation test = IborAveragedRateComputation.of(FIXINGS);

            ImmutableSet.Builder <Index> builder = ImmutableSet.builder();
            test.collectIndices(builder);
            assertEquals(builder.build(), ImmutableSet.of(GBP_LIBOR_3M));
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            IborAveragedRateComputation test = IborAveragedRateComputation.of(FIXINGS);

            coverImmutableBean(test);
            IborAveragedRateComputation test2 = IborAveragedRateComputation.of(FIXINGS.subList(0, 1));

            coverBeanEquals(test, test2);
        }
Esempio n. 4
0
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         IborAveragedRateComputation other = (IborAveragedRateComputation)obj;
         return(JodaBeanUtils.equal(fixings, other.fixings));
     }
     return(false);
 }
        public virtual void test_serialization()
        {
            IborAveragedRateComputation test = IborAveragedRateComputation.of(FIXINGS);

            assertSerialization(test);
        }