public void SubmitCallsServiceWithCorrectOrder()
        {
            var ordersService = new MockOrdersService();
            var viewModel     = new OrderDetailsViewModel(new MockAccountPositionService(), ordersService);

            viewModel.Shares          = 2;
            viewModel.TickerSymbol    = "AAAA";
            viewModel.TransactionType = TransactionType.Buy;
            viewModel.TimeInForce     = TimeInForce.EndOfDay;
            viewModel.OrderType       = OrderType.Limit;
            viewModel.StopLimitPrice  = 15;

            Assert.IsNull(ordersService.SubmitArgumentOrder);
            viewModel.SubmitCommand.Execute(null);

            var submittedOrder = ordersService.SubmitArgumentOrder;

            Assert.IsNotNull(submittedOrder);
            Assert.AreEqual("AAAA", submittedOrder.TickerSymbol);
            Assert.AreEqual(TransactionType.Buy, submittedOrder.TransactionType);
            Assert.AreEqual(TimeInForce.EndOfDay, submittedOrder.TimeInForce);
            Assert.AreEqual(OrderType.Limit, submittedOrder.OrderType);
            Assert.AreEqual(15, submittedOrder.StopLimitPrice);
        }
        public void SubmitCallsServiceWithCorrectOrder()
        {
            var ordersService = new MockOrdersService();
            var viewModel = new OrderDetailsViewModel(new MockAccountPositionService(), ordersService);
            viewModel.Shares = 2;
            viewModel.TickerSymbol = "AAAA";
            viewModel.TransactionType = TransactionType.Buy;
            viewModel.TimeInForce = TimeInForce.EndOfDay;
            viewModel.OrderType = OrderType.Limit;
            viewModel.StopLimitPrice = 15;

            Assert.IsNull(ordersService.SubmitArgumentOrder);
            viewModel.SubmitCommand.Execute(null);

            var submittedOrder = ordersService.SubmitArgumentOrder;
            Assert.IsNotNull(submittedOrder);
            Assert.AreEqual("AAAA", submittedOrder.TickerSymbol);
            Assert.AreEqual(TransactionType.Buy, submittedOrder.TransactionType);
            Assert.AreEqual(TimeInForce.EndOfDay, submittedOrder.TimeInForce);
            Assert.AreEqual(OrderType.Limit, submittedOrder.OrderType);
            Assert.AreEqual(15, submittedOrder.StopLimitPrice);
        }