Esempio n. 1
0
        public virtual void test_combinedWith_mutable()
        {
            SwaptionSensitivity       @base    = SwaptionSensitivity.of(NAME, EXPIRY, TENOR, STRIKE, FORWARD, GBP, 32d);
            MutablePointSensitivities expected = new MutablePointSensitivities();

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

            assertEquals(test, expected);
        }
Esempio n. 2
0
        //-------------------------------------------------------------------------
        public virtual void test_combinedWith()
        {
            SwaptionSensitivity       base1    = SwaptionSensitivity.of(NAME, EXPIRY, TENOR, STRIKE, FORWARD, GBP, 32d);
            SwaptionSensitivity       base2    = SwaptionSensitivity.of(NAME, EXPIRY, TENOR, STRIKE, FORWARD, GBP, 22d);
            MutablePointSensitivities expected = new MutablePointSensitivities();

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

            assertEquals(test, expected);
        }