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); }
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); }
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); }