public virtual void test_combinedWith_mutable() { InflationRateSensitivity @base = InflationRateSensitivity.of(CH_CPI_OBS, 5.0); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(@base); PointSensitivityBuilder test = @base.combinedWith(new MutablePointSensitivities()); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { InflationRateSensitivity base1 = InflationRateSensitivity.of(CH_CPI_OBS, 5.0); InflationRateSensitivity base2 = InflationRateSensitivity.of(CH_CPI_OBS, 7.0); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }