/** * Gets the identifier of the data. * <p> * This returns an artificial identifier with a scheme of 'OG-Future' and * a value of the index name. * * @return the standard identifier */ @Override public StandardId getStandardId() { return StandardId.of("OG-Index", index.getName()); }
/** * 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 = "name") public void test_name(Index convention, String name) { assertEquals(convention.getName(), name); }
@Test(dataProvider = "indexName") public void test_of_lookup(Index convention, String name) { assertEquals(Index.of(name), convention); }
@Test(dataProvider = "indexName") public void test_name(Index convention, String name) { assertEquals(convention.getName(), name); }
public void test_of_lookup_notFound() { assertThrowsIllegalArg(() -> Index.of("Rubbish")); }
public void test_of_lookup_null() { assertThrowsIllegalArg(() -> Index.of((String) null)); }