//------------------------------------------------------------------------- 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); }
//------------------------------------------------------------------------- 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)); }
//------------------------------------------------------------------------- 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); }