GeneratorPriceIndexCurveMultiplyFixedCurve extends GeneratorPriceIndexCurve { @Override public PriceIndexCurve generateCurve(final String name, final double[] parameters) { final PriceIndexCurve newCurve = _generator.generateCurve(name, parameters); return new PriceIndexCurveMultiplyFixedCurve(name, newCurve, _fixedCurve); } GeneratorPriceIndexCurveMultiplyFixedCurve(final GeneratorPriceIndexCurve generator, final DoublesCurve fixedCurve); @Override int getNumberOfParameter(); @Override PriceIndexCurve generateCurve(final String name, final double[] parameters); @Override PriceIndexCurve generateCurve(final String name, final InflationProviderInterface inflation, final double[] parameters); @Override GeneratorPriceIndexCurve finalGenerator(final Object data); @Override double[] initialGuess(final double[] rates);  }
@Test public void generateCurve() { String name = "CRV"; double[] values = new double[NB_NODES]; PriceIndexCurve curveGenerated = GENERATOR_MULT.generateCurve(name, values); assertTrue("GeneratorPriceIndexCurveMultiplyFixedCurve", curveGenerated instanceof PriceIndexCurveMultiplyFixedCurve); PriceIndexCurveMultiplyFixedCurve curveMult = (PriceIndexCurveMultiplyFixedCurve) curveGenerated; assertEquals("GeneratorPriceIndexCurveMultiplyFixedCurve", curveMult.getName(), name); assertEquals("GeneratorPriceIndexCurveMultiplyFixedCurve", curveMult.getNumberOfParameters(), NB_NODES); }