/** * Gets the currency of the floating rate. * * @return the currency * @throws IllegalArgumentException if unable to return an index, which should * only happen if the system is not configured correctly */ public default Currency getCurrency() { return toFloatingRateIndex().getCurrency(); }
@Test(dataProvider = "nameType") public void test_name(String name, String indexName, FloatingRateType type) { FloatingRateName test = FloatingRateName.of(name); assertEquals(test.getName(), name); assertEquals(test.getType(), type); assertEquals(test.getCurrency(), test.toFloatingRateIndex().getCurrency()); }