Ejemplo n.º 1
0
        //-------------------------------------------------------------------------
        public virtual void test_withQuantity()
        {
            IborFutureTrade @base    = sut();
            double          quantity = 65243;
            IborFutureTrade computed = @base.withQuantity(quantity);
            IborFutureTrade expected = IborFutureTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(quantity).price(PRICE).build();

            assertEquals(computed, expected);
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            IborFutureTrade test = sut();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Price, PRICE);
            assertEquals(test.Quantity, QUANTITY);
            assertEquals(test.withInfo(TRADE_INFO).Info, TRADE_INFO);
            assertEquals(test.withQuantity(0.9129).Quantity, 0.9129d, 1e-10);
            assertEquals(test.withPrice(0.9129).Price, 0.9129d, 1e-10);
        }