// ------------------------------------------------------------------------- @DataProvider(name = "name") static Object[][] data_name() { return new Object[][] { {ImmutableIborFixingDepositConvention.of(GBP_LIBOR_3M), "GBP-LIBOR-3M"}, {ImmutableIborFixingDepositConvention.of(USD_LIBOR_3M), "USD-LIBOR-3M"}, }; }
// ------------------------------------------------------------------------- public void coverage() { ImmutableIborFixingDepositConvention test1 = ImmutableIborFixingDepositConvention.of(GBP_LIBOR_6M); coverImmutableBean(test1); ImmutableIborFixingDepositConvention test2 = ImmutableIborFixingDepositConvention.of(EUR_LIBOR_3M).toBuilder().name("Foo").build(); coverBeanEquals(test1, test2); coverPrivateConstructor(IborFixingDepositConventions.class); coverPrivateConstructor(IborFixingDepositConventionLookup.class); }
public void test_of_indexOnly() { ImmutableIborFixingDepositConvention test = ImmutableIborFixingDepositConvention.of(GBP_LIBOR_6M); assertEquals( test.getBusinessDayAdjustment(), BusinessDayAdjustment.of(MODIFIED_FOLLOWING, GBP_LIBOR_6M.getFixingCalendar())); assertEquals(test.getCurrency(), GBP_LIBOR_6M.getCurrency()); assertEquals(test.getDayCount(), GBP_LIBOR_6M.getDayCount()); assertEquals(test.getFixingDateOffset(), GBP_LIBOR_6M.getFixingDateOffset()); assertEquals(test.getIndex(), GBP_LIBOR_6M); assertEquals(test.getSpotDateOffset(), GBP_LIBOR_6M.getEffectiveDateOffset()); }
public void test_expand() { ImmutableIborFixingDepositConvention base = ImmutableIborFixingDepositConvention.of(EUR_LIBOR_3M); IborFixingDepositConvention test = base.expand(); IborFixingDepositConvention expected = ImmutableIborFixingDepositConvention.builder() .businessDayAdjustment( BusinessDayAdjustment.of(MODIFIED_FOLLOWING, EUR_LIBOR_3M.getFixingCalendar())) .currency(EUR_LIBOR_3M.getCurrency()) .dayCount(EUR_LIBOR_3M.getDayCount()) .fixingDateOffset(EUR_LIBOR_3M.getFixingDateOffset()) .index(EUR_LIBOR_3M) .name(EUR_LIBOR_3M.getName()) .spotDateOffset(EUR_LIBOR_3M.getEffectiveDateOffset()) .build(); assertEquals(test.getName(), EUR_LIBOR_3M.getName()); assertEquals(test, expected); }
public void test_serialization() { ImmutableIborFixingDepositConvention test = ImmutableIborFixingDepositConvention.of(GBP_LIBOR_6M); assertSerialization(test); }