//-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            Position             trade    = sut();
            PortfolioItemSummary expected = PortfolioItemSummary.builder().portfolioItemType(PortfolioItemType.POSITION).productType(ProductType.SECURITY).description("B x 123").build();

            assertEquals(trade.summarize(), expected);
        }
        //-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            SecurityTrade        trade    = sut();
            PortfolioItemSummary expected = PortfolioItemSummary.builder().portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.SECURITY).description("Id x 100").build();

            assertEquals(trade.summarize(), expected);
        }
        //-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            GenericSecurityPosition trade    = sut();
            PortfolioItemSummary    expected = PortfolioItemSummary.builder().id(POSITION_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.POSITION).productType(ProductType.SECURITY).currencies(SECURITY.Currency).description("1 x 100").build();

            assertEquals(trade.summarize(), expected);
        }
Ejemplo n.º 4
0
        //-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            Trade trade = sut();
            PortfolioItemSummary expected = PortfolioItemSummary.builder().portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.OTHER).description("Unknown: MockTrade").build();

            assertEquals(trade.summarize(), expected);
        }
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         PortfolioItemSummary other = (PortfolioItemSummary)obj;
         return(JodaBeanUtils.equal(id, other.id) && JodaBeanUtils.equal(portfolioItemType, other.portfolioItemType) && JodaBeanUtils.equal(productType, other.productType) && JodaBeanUtils.equal(currencies, other.currencies) && JodaBeanUtils.equal(description, other.description));
     }
     return(false);
 }
 internal static PortfolioItemSummary sut2()
 {
     return(PortfolioItemSummary.builder().portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.FRA).currencies(Currency.USD).description("Two").build());
 }
 //-------------------------------------------------------------------------
 internal static PortfolioItemSummary sut()
 {
     return(PortfolioItemSummary.builder().id(STANDARD_ID).portfolioItemType(PortfolioItemType.POSITION).productType(ProductType.SECURITY).currencies(Currency.GBP).description("One").build());
 }