//-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            TermDepositTrade test = TermDepositTrade.of(TRADE_INFO, DEPOSIT);

            assertEquals(test.resolve(REF_DATA).Info, TRADE_INFO);
            assertEquals(test.resolve(REF_DATA).Product, DEPOSIT.resolve(REF_DATA));
        }
        //-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            TermDepositTrade     trade    = TermDepositTrade.builder().product(DEPOSIT).info(TRADE_INFO).build();
            PortfolioItemSummary expected = PortfolioItemSummary.builder().id(TRADE_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.TERM_DEPOSIT).currencies(Currency.GBP).description("6M GBP 100mm Deposit 2.5% : 19Jan15-19Jul15").build();

            assertEquals(trade.summarize(), expected);
        }
        public virtual void test_builder()
        {
            TermDepositTrade test = TermDepositTrade.builder().product(DEPOSIT).info(TRADE_INFO).build();

            assertEquals(test.Product, DEPOSIT);
            assertEquals(test.Info, TRADE_INFO);
        }
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            TermDepositTrade test = TermDepositTrade.of(TRADE_INFO, DEPOSIT);

            assertEquals(test.Product, DEPOSIT);
            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.withInfo(TRADE_INFO).Info, TRADE_INFO);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            TermDepositTrade test1 = TermDepositTrade.builder().product(DEPOSIT).info(TRADE_INFO).build();

            coverImmutableBean(test1);
            TermDepositTrade test2 = TermDepositTrade.builder().product(DEPOSIT).build();

            coverBeanEquals(test1, test2);
        }
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         TermDepositTrade other = (TermDepositTrade)obj;
         return(JodaBeanUtils.equal(info, other.info) && JodaBeanUtils.equal(product, other.product));
     }
     return(false);
 }
        public virtual void test_serialization()
        {
            TermDepositTrade test = TermDepositTrade.builder().product(DEPOSIT).info(TRADE_INFO).build();

            assertSerialization(test);
        }