Пример #1
0
        public virtual void test_withPrice()
        {
            BondFutureTrade @base    = sut();
            double          price    = 1.5d;
            BondFutureTrade computed = @base.withPrice(price);
            BondFutureTrade expected = BondFutureTrade.builder().info(TRADE_INFO).product(FUTURE).quantity(QUANTITY).price(price).build();

            assertEquals(computed, expected);
        }
Пример #2
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            BondFutureTrade test = sut();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, FUTURE);
            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);
        }