コード例 #1
0
        //-------------------------------------------------------------------------
        public virtual void test_summarize()
        {
            SwapTrade            trade    = SwapTrade.of(TRADE_INFO, SWAP1);
            PortfolioItemSummary expected = PortfolioItemSummary.builder().id(TRADE_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.SWAP).currencies(Currency.GBP, Currency.EUR, Currency.USD).description("7M Pay [GBP-LIBOR-3M, EUR/GBP-ECB, EUR-EONIA] / Rec [GBP-LIBOR-3M, EUR/GBP-ECB, EUR-EONIA] : 15Jan12-15Aug12").build();

            assertEquals(trade.summarize(), expected);
        }
コード例 #2
0
        //-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            SwapTrade test = SwapTrade.of(TRADE_INFO, SWAP1);

            assertEquals(test.resolve(REF_DATA).Info, TRADE_INFO);
            assertEquals(test.resolve(REF_DATA).Product, SWAP1.resolve(REF_DATA));
        }
コード例 #3
0
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            SwapTrade test = SwapTrade.of(TRADE_INFO, SWAP1);

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, SWAP1);
            assertEquals(test.withInfo(TRADE_INFO).Info, TRADE_INFO);
        }