//-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            FxSingleBarrierOptionTrade         @base    = sut();
            ResolvedFxSingleBarrierOptionTrade expected = ResolvedFxSingleBarrierOptionTrade.builder().info(TRADE_INFO).product(PRODUCT.resolve(REF_DATA)).premium(PREMIUM.resolve(REF_DATA)).build();

            assertEquals(@base.resolve(REF_DATA), expected);
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ResolvedFxSingleBarrierOptionTrade test1 = ResolvedFxSingleBarrierOptionTrade.builder().info(TRADE_INFO).product(PRODUCT).premium(PREMIUM).build();
            ResolvedFxSingleBarrierOptionTrade test2 = ResolvedFxSingleBarrierOptionTrade.builder().product(ResolvedFxSingleBarrierOption.of(VANILLA_OPTION, BARRIER)).premium(Payment.of(CurrencyAmount.of(EUR, NOTIONAL * 0.01), date(2014, 11, 13))).build();

            coverImmutableBean(test1);
            coverBeanEquals(test1, test2);
        }
Ejemplo n.º 3
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            ResolvedFxSingleBarrierOptionTrade test = ResolvedFxSingleBarrierOptionTrade.builder().info(TRADE_INFO).product(PRODUCT).premium(PREMIUM).build();

            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Premium, PREMIUM);
        }
Ejemplo n.º 4
0
        public virtual void test_serialization()
        {
            ResolvedFxSingleBarrierOptionTrade test = ResolvedFxSingleBarrierOptionTrade.builder().info(TRADE_INFO).product(PRODUCT).premium(PREMIUM).build();

            assertSerialization(test);
        }