Beispiel #1
0
        //-------------------------------------------------------------------------
        public virtual void test_withQuantity()
        {
            BondFutureOptionTrade @base    = sut();
            double quantity                = 5432d;
            BondFutureOptionTrade computed = @base.withQuantity(quantity);
            BondFutureOptionTrade expected = BondFutureOptionTrade.builder().info(TRADE_INFO).product(OPTION_PRODUCT).quantity(quantity).price(PRICE.Value).build();

            assertEquals(computed, expected);
        }
Beispiel #2
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            BondFutureOptionTrade test = sut();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, OPTION_PRODUCT);
            assertEquals(test.Quantity, QUANTITY);
            assertEquals(test.Price, PRICE);
            assertEquals(test.withInfo(TRADE_INFO).Info, TRADE_INFO);
            assertEquals(test.withQuantity(129).Quantity, 129d, 0d);
            assertEquals(test.withPrice(129).Price, 129d, 0d);
        }