Esempio n. 1
0
        //-------------------------------------------------------------------------
        public virtual void test_of_withoutFixings()
        {
            SimpleIborIndexRates test = SimpleIborIndexRates.of(GBP_LIBOR_3M, DATE_VAL, CURVE);

            assertEquals(test.Index, GBP_LIBOR_3M);
            assertEquals(test.ValuationDate, DATE_VAL);
            assertEquals(test.Fixings, SERIES_EMPTY);
            assertEquals(test.Curve, CURVE);
            assertEquals(test.ParameterCount, CURVE.ParameterCount);
            assertEquals(test.getParameter(0), CURVE.getParameter(0));
            assertEquals(test.getParameterMetadata(0), CURVE.getParameterMetadata(0));
            assertEquals(test.withParameter(0, 1d).Curve, CURVE.withParameter(0, 1d));
            assertEquals(test.withPerturbation((i, v, m) => v + 1d).Curve, CURVE.withPerturbation((i, v, m) => v + 1d));
            assertEquals(test.findData(CURVE.Name), CURVE);
            assertEquals(test.findData(CurveName.of("Rubbish")), null);
            // check IborIndexRates
            IborIndexRates test2 = IborIndexRates.of(GBP_LIBOR_3M, DATE_VAL, CURVE);

            assertEquals(test, test2);
        }