Example #1
0
        public virtual void test_builder2()
        {
            DefaultCurveMetadata test = DefaultCurveMetadata.builder().curveName(CURVE_NAME).xValueType(ValueType.YEAR_FRACTION).yValueType(ValueType.DISCOUNT_FACTOR).addInfo(CurveInfoType.DAY_COUNT, ACT_360).jacobian(JACOBIAN_DATA).parameterMetadata(ParameterMetadata.empty()).build();

            assertThat(test.CurveName).isEqualTo(CURVE_NAME);
            assertThat(test.XValueType).isEqualTo(ValueType.YEAR_FRACTION);
            assertThat(test.YValueType).isEqualTo(ValueType.DISCOUNT_FACTOR);
            assertThat(test.getInfo(CurveInfoType.DAY_COUNT)).isEqualTo(ACT_360);
            assertThat(test.findInfo(CurveInfoType.DAY_COUNT)).isEqualTo(ACT_360);
            assertThat(test.getInfo(CurveInfoType.JACOBIAN)).isEqualTo(JACOBIAN_DATA);
            assertThat(test.findInfo(CurveInfoType.JACOBIAN)).isEqualTo(JACOBIAN_DATA);
            assertThat(test.findInfo(CurveInfoType.of("Rubbish"))).isEqualTo(null);
            assertThat(test.ParameterMetadata.Present).True;
            assertThat(test.ParameterMetadata.get()).containsExactly(ParameterMetadata.empty());
        }