Esempio n. 1
0
        public virtual void test_withValues_badSize()
        {
            InterpolatedNodalCurve @base = InterpolatedNodalCurve.of(METADATA, XVALUES, YVALUES, INTERPOLATOR);

            assertThrowsIllegalArg(() => @base.withYValues(DoubleArray.EMPTY));
            assertThrowsIllegalArg(() => @base.withYValues(DoubleArray.of(4d, 6d)));
        }
Esempio n. 2
0
        //-------------------------------------------------------------------------
        public virtual void test_withValues()
        {
            InterpolatedNodalCurve @base = InterpolatedNodalCurve.of(METADATA, XVALUES, YVALUES, INTERPOLATOR);
            InterpolatedNodalCurve test  = @base.withYValues(YVALUES_BUMPED);

            assertThat(test.Name).isEqualTo(CURVE_NAME);
            assertThat(test.ParameterCount).isEqualTo(SIZE);
            assertThat(test.Metadata).isEqualTo(METADATA);
            assertThat(test.XValues).isEqualTo(XVALUES);
            assertThat(test.YValues).isEqualTo(YVALUES_BUMPED);
        }