// ------------------------------------------------------------------------- public void test_equals() { ImmutableIborIndex a = ImmutableIborIndex.builder() .name("OGIBOR") .currency(Currency.GBP) .fixingCalendar(GBLO) .fixingDateOffset(DaysAdjustment.ofBusinessDays(-2, GBLO)) .effectiveDateOffset(DaysAdjustment.ofBusinessDays(2, GBLO)) .maturityDateOffset( TenorAdjustment.ofLastBusinessDay(TENOR_3M, BusinessDayAdjustment.NONE)) .dayCount(ACT_360) .build(); IborIndex b = a.toBuilder().name("Rubbish").build(); assertEquals(a.equals(b), false); }
public void test_serialization() { IborIndex index = ImmutableIborIndex.builder() .name("OGIBOR") .currency(Currency.GBP) .fixingCalendar(GBLO) .fixingDateOffset(DaysAdjustment.ofBusinessDays(-2, GBLO)) .effectiveDateOffset(DaysAdjustment.ofBusinessDays(2, GBLO)) .maturityDateOffset( TenorAdjustment.ofLastBusinessDay(TENOR_3M, BusinessDayAdjustment.NONE)) .dayCount(ACT_360) .build(); assertSerialization(index); }
// ------------------------------------------------------------------------- public void coverage() { ImmutableIborIndex index = ImmutableIborIndex.builder() .name("OGIBOR") .currency(Currency.GBP) .fixingCalendar(GBLO) .fixingDateOffset(DaysAdjustment.ofBusinessDays(-2, GBLO)) .effectiveDateOffset(DaysAdjustment.ofBusinessDays(2, GBLO)) .maturityDateOffset( TenorAdjustment.ofLastBusinessDay(TENOR_3M, BusinessDayAdjustment.NONE)) .dayCount(ACT_360) .build(); coverImmutableBean(index); coverPrivateConstructor(IborIndices.class); }