Esempio n. 1
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ResolvedCdsIndexTrade test1 = ResolvedCdsIndexTrade.builder().product(PRODUCT).upfrontFee(UPFRONT).info(TRADE_INFO).build();

            coverImmutableBean(test1);
            ResolvedCdsIndex      product = CdsIndex.of(BUY, INDEX_ID, LEGAL_ENTITIES, USD, 1.e9, START_DATE, END_DATE, P6M, SAT_SUN, 0.067).resolve(REF_DATA);
            ResolvedCdsIndexTrade test2   = ResolvedCdsIndexTrade.builder().product(product).info(TradeInfo.empty()).build();

            coverBeanEquals(test1, test2);
        }
Esempio n. 2
0
        public virtual void test_builder_full()
        {
            ResolvedCdsIndexTrade test = ResolvedCdsIndexTrade.builder().product(PRODUCT).info(TRADE_INFO).upfrontFee(UPFRONT).build();

            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.UpfrontFee.get(), UPFRONT);

            ResolvedCdsTrade singleName = test.toSingleNameCds();

            assertEquals(singleName.Product, PRODUCT.toSingleNameCds());
            assertEquals(singleName.Info, TRADE_INFO);
            assertEquals(singleName.UpfrontFee.get(), UPFRONT);
        }
Esempio n. 3
0
        public virtual void test_builder_min()
        {
            ResolvedCdsIndexTrade test = ResolvedCdsIndexTrade.builder().product(PRODUCT).info(TRADE_INFO).build();

            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Info, TRADE_INFO);
            assertFalse(test.UpfrontFee.Present);

            ResolvedCdsTrade singleName = test.toSingleNameCds();

            assertEquals(singleName.Product, PRODUCT.toSingleNameCds());
            assertEquals(singleName.Info, TRADE_INFO);
            assertFalse(singleName.UpfrontFee.Present);
        }
Esempio n. 4
0
        public virtual void test_serialization()
        {
            ResolvedCdsIndexTrade test = ResolvedCdsIndexTrade.builder().product(PRODUCT).upfrontFee(UPFRONT).info(TRADE_INFO).build();

            assertSerialization(test);
        }