public virtual void test_load() { ImmutableListMultimap <LocalDate, LegalEntityCurveGroup> allCurves = LegalEntityRatesCurvesCsvLoader.loadAllDates(ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); foreach (LocalDate date in ALL_DATES) { ImmutableList <LegalEntityCurveGroup> oneDayCurves = LegalEntityRatesCurvesCsvLoader.load(date, ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); assertEquals(oneDayCurves, allCurves.get(date)); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Rates curve loader found multiple curves with the same name: .*") public void test_multiple_curves() public virtual void test_multiple_curves() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[6], ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
public virtual void test_date_outside_range() { ImmutableList <LegalEntityCurveGroup> result = LegalEntityRatesCurvesCsvLoader.load(LocalDate.of(2017, 1, 24), ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); assertTrue(result.Empty); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Repo curve values .*") public void test_missing_repo_curve() public virtual void test_missing_repo_curve() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[5], ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2_REPO_MISSING))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Unsupported curve type: Forward") public void test_invalid_curve_type() public virtual void test_invalid_curve_type() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[6], ResourceLocator.of(GROUPS_INVALID_CURVE_TYPE), ResourceLocator.of(SETTINGS), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
//------------------------------------------------------------------------- //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void test_missing_groups_file() public virtual void test_missing_groups_file() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[6], ResourceLocator.of(GROUPS), ResourceLocator.of("classpath:invalid"), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Unsupported Value Type in curve settings: Forward") public void test_invalid_settings_value_type_file() public virtual void test_invalid_settings_value_type_file() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[0], ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS_INVALID_VALUE), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "CurveExtrapolator name not found: Cubic") public void test_invalid_settings_right_extrapolator_file() public virtual void test_invalid_settings_right_extrapolator_file() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[4], ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS_INVALID_RIGHT), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Header not found: 'Curve Name'") public void test_invalid_settings_missing_column_file() public virtual void test_invalid_settings_missing_column_file() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[6], ResourceLocator.of(GROUPS), ResourceLocator.of(SETTINGS_MISSING_CURVE_NAME), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }
//------------------------------------------------------------------------- //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void test_setting_invalid_path() public virtual void test_setting_invalid_path() { LegalEntityRatesCurvesCsvLoader.load(ALL_DATES[4], ResourceLocator.of(GROUPS), ResourceLocator.of("classpath:invalid"), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); }