Exemplo n.º 1
0
        public virtual void test_combinedWith_mutable()
        {
            ZeroRateSensitivity       @base    = ZeroRateSensitivity.of(GBP, YEARFRAC, 32d);
            MutablePointSensitivities expected = new MutablePointSensitivities();

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

            assertEquals(test, expected);
        }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        public virtual void test_combinedWith()
        {
            ZeroRateSensitivity       base1    = ZeroRateSensitivity.of(GBP, YEARFRAC, 32d);
            ZeroRateSensitivity       base2    = ZeroRateSensitivity.of(GBP, YEARFRAC2, 22d);
            MutablePointSensitivities expected = new MutablePointSensitivities();

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

            assertEquals(test, expected);
        }