public virtual void test_summarize_singleLeg() { CmsTrade trade = CmsTrade.builder().product(Cms.of(CmsLegTest.sutCap())).build(); PortfolioItemSummary expected = PortfolioItemSummary.builder().id(TRADE_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.CMS).currencies(Currency.EUR).description("2Y EUR 1mm Rec EUR-EURIBOR-1100-10Y Cap 1.25% : 21Oct15-21Oct17").build(); assertEquals(trade.summarize(), expected); }
public virtual void test_summarize_floor() { CmsTrade trade = CmsTrade.builder().info(TRADE_INFO).product(PRODUCT_FLOOR).premium(PREMIUM).build(); PortfolioItemSummary expected = PortfolioItemSummary.builder().id(TRADE_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.CMS).currencies(Currency.EUR).description("2Y EUR 1mm Rec EUR-EURIBOR-1100-10Y Floor 1.25% / Pay Premium : 21Oct15-21Oct17").build(); assertEquals(trade.summarize(), expected); }