public virtual void test_of_singleCurrency() { ResolvedSwap test = ResolvedSwap.of(LEG1); assertEquals(test.Legs, ImmutableSet.of(LEG1)); assertEquals(test.CrossCurrency, false); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(GBP)); assertEquals(test.allIndices(), ImmutableSet.of(GBP_LIBOR_3M)); }
public virtual void test_builder() { ResolvedSwap test = ResolvedSwap.builder().legs(LEG1).build(); assertEquals(test.Legs, ImmutableSet.of(LEG1)); assertEquals(test.CrossCurrency, false); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(GBP)); assertEquals(test.allIndices(), ImmutableSet.of(GBP_LIBOR_3M)); }
public virtual void test_of() { ResolvedSwap test = ResolvedSwap.of(LEG1, LEG2); assertEquals(test.Legs, ImmutableSet.of(LEG1, LEG2)); assertEquals(test.getLegs(SwapLegType.FIXED), ImmutableList.of(LEG1)); assertEquals(test.getLegs(SwapLegType.IBOR), ImmutableList.of(LEG2)); assertEquals(test.getLeg(PayReceive.PAY), LEG1); assertEquals(test.getLeg(PayReceive.RECEIVE), LEG2); assertEquals(test.PayLeg, LEG1); assertEquals(test.ReceiveLeg, LEG2); assertEquals(test.StartDate, LEG1.StartDate); assertEquals(test.EndDate, LEG1.EndDate); assertEquals(test.CrossCurrency, true); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(GBP, USD)); assertEquals(test.allIndices(), ImmutableSet.of(GBP_LIBOR_3M)); }