Beispiel #1
0
        public virtual void test_min_resolve()
        {
            ResolvedCdsTrade test = CdsTrade.builder().product(PRODUCT).info(TRADE_INFO).build().resolve(REF_DATA);

            assertEquals(test.Product, PRODUCT.resolve(REF_DATA));
            assertEquals(test.Info, TRADE_INFO);
            assertFalse(test.UpfrontFee.Present);
        }
Beispiel #2
0
        public virtual void test_min_builder()
        {
            CdsTrade test = CdsTrade.builder().product(PRODUCT).info(TRADE_INFO).build();

            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Info, TRADE_INFO);
            assertFalse(test.UpfrontFee.Present);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage_trade()
        {
            CdsCalibrationTrade test1 = CdsCalibrationTrade.of(TRADE, QUOTE1);

            coverImmutableBean(test1);
            CdsCalibrationTrade test2 = CdsCalibrationTrade.of(CdsTrade.builder().product(PRODUCT).info(TRADE_INFO).build(), QUOTE2);

            coverBeanEquals(test1, test2);
        }
Beispiel #4
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            CdsTrade test1 = sut();

            coverImmutableBean(test1);
            Cds      product = Cds.of(BUY, LEGAL_ENTITY, USD, 1.e9, START_DATE, END_DATE, P3M, SAT_SUN, 0.067);
            CdsTrade test2   = CdsTrade.builder().product(product).info(TradeInfo.empty()).build();

            coverBeanEquals(test1, test2);
        }
Beispiel #5
0
 //-------------------------------------------------------------------------
 internal virtual CdsTrade sut()
 {
     return(CdsTrade.builder().product(PRODUCT).upfrontFee(UPFRONT).info(TRADE_INFO).build());
 }