Exemple #1
0
        public void TestSendNumLotsZeroDefault()
        {
            var order = new StopOrder(new SOrderParameters());

            using var monitoredOrder = order.Monitor();
            order.Send(13, 0);
            monitoredOrder.Should().Raise("OrderSent")
            .WithArgs <OrderInfo>(info => info.ConditionPrice == 13)
            .WithArgs <OrderInfo>(info => info.Size == 100);
        }
Exemple #2
0
        public void TestSendCustomNumLots()
        {
            var order = new StopOrder(
                new SOrderParameters(Contracts.CreateUserSpecified(100), EOrderAction.Buy));

            using var monitoredOrder = order.Monitor();
            order.Send(14, 25);
            monitoredOrder.Should().Raise("OrderSent")
            .WithArgs <OrderInfo>(info => info.ConditionPrice == 14)
            .WithArgs <OrderInfo>(info => info.OrderAction == EOrderAction.Buy)
            .WithArgs <OrderInfo>(info => info.Size == 25);
        }
Exemple #3
0
        public void TestSend()
        {
            var order = new StopOrder(new SOrderParameters());

            using var monitoredOrder = order.Monitor();
            order.Send(15);
            monitoredOrder
            .Should().Raise("OrderSent")
            .WithArgs <OrderInfo>(info => info.ConditionPrice == 15)
            .WithArgs <OrderInfo>(info => info.OrderAction == EOrderAction.Buy)
            .WithArgs <OrderInfo>(info => info.Size == 100);
        }