//------------------------------------------------------------------------- public virtual void test_builder() { ResolvedIborFutureTrade test = sut(); assertEquals(test.Info, TRADE_INFO); assertEquals(test.Product, PRODUCT); assertEquals(test.Quantity, QUANTITY); assertEquals(test.TradedPrice, TradedPrice.of(TRADE_DATE, PRICE)); }
//------------------------------------------------------------------------- public virtual void test_resolve() { IborFutureTrade test = sut(); ResolvedIborFutureTrade resolved = test.resolve(REF_DATA); assertEquals(resolved.Info, TRADE_INFO); assertEquals(resolved.Product, PRODUCT.resolve(REF_DATA)); assertEquals(resolved.Quantity, QUANTITY); assertEquals(resolved.TradedPrice, TradedPrice.of(TRADE_DATE, PRICE)); }
public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { ResolvedIborFutureTrade other = (ResolvedIborFutureTrade)obj; return(JodaBeanUtils.equal(info, other.info) && JodaBeanUtils.equal(product, other.product) && JodaBeanUtils.equal(quantity, other.quantity) && JodaBeanUtils.equal(tradedPrice, other.tradedPrice)); } return(false); }
internal static ResolvedIborFutureTrade sut2() { return(ResolvedIborFutureTrade.builder().info(TRADE_INFO2).product(PRODUCT2).quantity(QUANTITY2).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE2)).build()); }
//------------------------------------------------------------------------- public virtual void test_resolve() { ResolvedIborFutureTrade expected = ResolvedIborFutureTrade.builder().info(POSITION_INFO).product(PRODUCT.resolve(REF_DATA)).quantity(QUANTITY).build(); assertEquals(sut().resolve(REF_DATA), expected); }