Esempio n. 1
0
        public virtual void test_none()
        {
            ScenarioPerturbation <double> test = ScenarioPerturbation.none();

            assertEquals(test.ScenarioCount, 1);
            MarketDataBox <double> box1 = MarketDataBox.ofScenarioValues(1d, 2d, 3d);

            assertEquals(test.applyTo(box1, REF_DATA), box1);
            MarketDataBox <double> box2 = MarketDataBox.ofSingleValue(1d);

            assertEquals(test.applyTo(box2, REF_DATA), box2);
        }
Esempio n. 2
0
        //  public void test_generics() {
        //    // Number perturbation should be able to alter a Double box, returning a Number box
        //    ScenarioPerturbation<Number> test = ScenarioPerturbation.none();
        //    assertEquals(test.getScenarioCount(), 1);
        //    MarketDataBox<Double> box = MarketDataBox.ofScenarioValues(1d, 2d, 3d);
        //    MarketDataBox<Number> perturbed = test.applyTo(box);
        //    assertEquals(perturbed, box);
        //  }

        public virtual void coverage()
        {
            ScenarioPerturbation <double> test = ScenarioPerturbation.none();

            coverImmutableBean((ImmutableBean)test);
        }