public Order(Client client, OrderType type, decimal amount)
        {
            if (client == null) throw new ArgumentNullException("client");
            ValidateAmount(amount);

            Id = Guid.NewGuid();

            Client = client;
            Type = type;
            Amount = amount;
        }
        public void TestInitialize()
        {
            _broker1 = new Broker1();
            _broker2 = new Broker2();
            var orderSplitService = new OrderSplitService(_broker1, _broker2);
            _orderRepository = new InMemoryOrderRepository();
            _orderExecutionService = new OrderExecutionService(orderSplitService, _orderRepository);

            _clientA = new Client(Guid.NewGuid(), "ClientA");
            _clientB = new Client(Guid.NewGuid(), "ClientB");
            _clientC = new Client(Guid.NewGuid(), "ClientC");
        }
 private void ExecuteOrderTestCase(Client client, OrderType orderType, decimal amount, decimal expectedTotalCost)
 {
     var order = new Order(client, orderType, amount);
     var actualTotalCost = _orderExecutionService.Execute(order);
     Assert.AreEqual(expectedTotalCost, actualTotalCost);
 }