//-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            DsfTrade         test     = sut();
            ResolvedDsfTrade expected = ResolvedDsfTrade.builder().info(TRADE_INFO).product(PRODUCT.resolve(REF_DATA)).quantity(QUANTITY).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE)).build();

            assertEquals(test.resolve(REF_DATA), expected);
        }
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            ResolvedDsfTrade test = sut();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Quantity, QUANTITY);
            assertEquals(test.TradedPrice, TradedPrice.of(TRADE_DATE, PRICE));
        }
Esempio n. 3
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         ResolvedDsfTrade other = (ResolvedDsfTrade)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 ResolvedDsfTrade sut2()
 {
     return(ResolvedDsfTrade.builder().product(PRODUCT2).quantity(QUANTITY2).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE2)).build());
 }
 //-------------------------------------------------------------------------
 internal static ResolvedDsfTrade sut()
 {
     return(ResolvedDsfTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(QUANTITY).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE)).build());
 }
        //-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            ResolvedDsfTrade expected = ResolvedDsfTrade.builder().info(POSITION_INFO).product(PRODUCT.resolve(REF_DATA)).quantity(QUANTITY).build();

            assertEquals(sut().resolve(REF_DATA), expected);
        }