//------------------------------------------------------------------------- public virtual void test_of() { SimpleDiscountFactors test = SimpleDiscountFactors.of(GBP, DATE_VAL, CURVE); assertEquals(test.Currency, GBP); assertEquals(test.ValuationDate, DATE_VAL); 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); }