public virtual void test_of_weekly_reverseOrder() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(EUR_EURIBOR_2W, EUR_EURIBOR_1W, FIXING_DATE, REF_DATA); assertEquals(test.ShortObservation, EUR_EURIBOR_1W_OBS); assertEquals(test.LongObservation, EUR_EURIBOR_2W_OBS); assertEquals(test.FixingDate, FIXING_DATE); }
//------------------------------------------------------------------------- public virtual void test_collectIndices() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(GBP_LIBOR_1M, GBP_LIBOR_3M, FIXING_DATE, REF_DATA); ImmutableSet.Builder <Index> builder = ImmutableSet.builder(); test.collectIndices(builder); assertEquals(builder.build(), ImmutableSet.of(GBP_LIBOR_1M, GBP_LIBOR_3M)); }
public virtual void test_of_monthly_reverseOrder() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(GBP_LIBOR_3M, GBP_LIBOR_1M, FIXING_DATE, REF_DATA); assertEquals(test.ShortObservation, GBP_LIBOR_1M_OBS); assertEquals(test.LongObservation, GBP_LIBOR_3M_OBS); assertEquals(test.FixingDate, FIXING_DATE); }
public virtual void test_of_weekMonthCombination() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(GBP_LIBOR_1W, GBP_LIBOR_1M, FIXING_DATE, REF_DATA); assertEquals(test.ShortObservation, GBP_LIBOR_1W_OBS); assertEquals(test.LongObservation, GBP_LIBOR_1M_OBS); assertEquals(test.FixingDate, FIXING_DATE); }
//------------------------------------------------------------------------- public virtual void coverage() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(GBP_LIBOR_1M, GBP_LIBOR_3M, FIXING_DATE, REF_DATA); coverImmutableBean(test); IborInterpolatedRateComputation test2 = IborInterpolatedRateComputation.of(USD_LIBOR_1M, USD_LIBOR_3M, date(2014, 7, 30), REF_DATA); coverBeanEquals(test, test2); }
//----------------------------------------------------------------------- public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { IborInterpolatedRateComputation other = (IborInterpolatedRateComputation)obj; return(JodaBeanUtils.equal(shortObservation, other.shortObservation) && JodaBeanUtils.equal(longObservation, other.longObservation)); } return(false); }
public virtual void test_serialization() { IborInterpolatedRateComputation test = IborInterpolatedRateComputation.of(GBP_LIBOR_1M, GBP_LIBOR_3M, FIXING_DATE, REF_DATA); assertSerialization(test); }
public virtual void test_of_differentFixingDates() { assertThrowsIllegalArg(() => IborInterpolatedRateComputation.meta().builder().set(IborInterpolatedRateComputation.meta().shortObservation(), GBP_LIBOR_1M_OBS).set(IborInterpolatedRateComputation.meta().longObservation(), GBP_LIBOR_3M_OBS2).build()); }
public virtual void test_of_differentCurrencies() { assertThrowsIllegalArg(() => IborInterpolatedRateComputation.of(EUR_EURIBOR_2W, GBP_LIBOR_1M, FIXING_DATE, REF_DATA)); }
public virtual void test_builder_indexOrder() { assertThrowsIllegalArg(() => IborInterpolatedRateComputation.meta().builder().set(IborInterpolatedRateComputation.meta().shortObservation(), GBP_LIBOR_3M_OBS).set(IborInterpolatedRateComputation.meta().longObservation(), GBP_LIBOR_1M_OBS).build()); assertThrowsIllegalArg(() => IborInterpolatedRateComputation.meta().builder().set(IborInterpolatedRateComputation.meta().shortObservation(), EUR_EURIBOR_2W_OBS).set(IborInterpolatedRateComputation.meta().longObservation(), EUR_EURIBOR_1W_OBS).build()); assertThrowsIllegalArg(() => IborInterpolatedRateComputation.of(EUR_EURIBOR_2W_OBS, EUR_EURIBOR_1W_OBS)); }
public virtual void test_of_sameIndex() { assertThrowsIllegalArg(() => IborInterpolatedRateComputation.of(GBP_LIBOR_1M, GBP_LIBOR_1M, FIXING_DATE, REF_DATA)); }