Пример #1
0
        //-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            OvernightFuturePosition      @base    = OvernightFuturePosition.builder().info(POSITION_INFO).product(PRODUCT).longQuantity(QUANTITY).build();
            ResolvedOvernightFutureTrade expected = ResolvedOvernightFutureTrade.builder().info(POSITION_INFO).product(PRODUCT.resolve(REF_DATA)).quantity(QUANTITY).build();

            assertEquals(@base.resolve(REF_DATA), expected);
        }
Пример #2
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ResolvedOvernightFutureTrade test1 = ResolvedOvernightFutureTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(QUANTITY).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE)).build();

            coverImmutableBean(test1);
            ResolvedOvernightFutureTrade test2 = ResolvedOvernightFutureTrade.builder().info(TradeInfo.empty()).product(PRODUCT2).quantity(QUANTITY2).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE2)).build();

            coverBeanEquals(test1, test2);
        }
Пример #3
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            ResolvedOvernightFutureTrade test = ResolvedOvernightFutureTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(QUANTITY).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE)).build();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Quantity, QUANTITY);
            assertEquals(test.TradedPrice, TradedPrice.of(TRADE_DATE, PRICE));
        }
Пример #4
0
        public virtual void test_serialization()
        {
            ResolvedOvernightFutureTrade test = ResolvedOvernightFutureTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(QUANTITY).tradedPrice(TradedPrice.of(TRADE_DATE, PRICE)).build();

            assertSerialization(test);
        }