/** * Attempts to locate a rate index by reference name. * <p> * This utility searches {@link IborIndex}, {@link OvernightIndex}, {@link FxIndex} * and {@link PriceIndex}. * * @param reference the reference name * @return the resolved rate index */ public static Index findIndex(String reference) { return Index.of(reference); }
@Test(dataProvider = "name") public void test_of_lookup(Index convention, String name) { assertEquals(Index.of(name), convention); }
@Test(dataProvider = "indexName") public void test_of_lookup(Index convention, String name) { assertEquals(Index.of(name), convention); }
public void test_of_lookup_null() { assertThrowsIllegalArg(() -> Index.of((String) null)); }
public void test_of_lookup_notFound() { assertThrowsIllegalArg(() -> Index.of("Rubbish")); }