Пример #1
0
        public virtual void test_combinedWith_mutable()
        {
            CreditCurveZeroRateSensitivity @base    = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, 32d);
            MutablePointSensitivities      expected = new MutablePointSensitivities();

            expected.add(@base);
            PointSensitivityBuilder test = @base.combinedWith(new MutablePointSensitivities());

            assertEquals(test, expected);
        }
Пример #2
0
        //-------------------------------------------------------------------------
        public virtual void test_combinedWith()
        {
            CreditCurveZeroRateSensitivity base1    = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, 32d);
            CreditCurveZeroRateSensitivity base2    = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, 22d);
            MutablePointSensitivities      expected = new MutablePointSensitivities();

            expected.add(base1).add(base2);
            PointSensitivityBuilder test = base1.combinedWith(base2);

            assertEquals(test, expected);
        }