コード例 #1
0
        //-------------------------------------------------------------------------
        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);
        }
コード例 #2
0
        //-------------------------------------------------------------------------
        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);
        }
コード例 #3
0
        //-------------------------------------------------------------------------
        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);
        }
コード例 #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);
        }
コード例 #5
0
 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);
 }
コード例 #6
0
 internal static PortfolioItemSummary sut2()
 {
     return(PortfolioItemSummary.builder().portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.FRA).currencies(Currency.USD).description("Two").build());
 }
コード例 #7
0
 //-------------------------------------------------------------------------
 internal static PortfolioItemSummary sut()
 {
     return(PortfolioItemSummary.builder().id(STANDARD_ID).portfolioItemType(PortfolioItemType.POSITION).productType(ProductType.SECURITY).currencies(Currency.GBP).description("One").build());
 }