예제 #1
0
        public void DeleteDeliveredOrder()
        {
            var order       = new Order();
            var orderEngine = new OrderEngine(ConnectionString, Provider);
            var newOrderId  = orderEngine.CreateOrder(order);

            order.StartProcessing(DateTime.Today);
            order.Deliver(DateTime.Today + TimeSpan.FromDays(1));
            orderEngine.EditOrder(newOrderId, order);
            orderEngine.DeleteOrder(newOrderId);
        }
예제 #2
0
        public void DeleteOrder()
        {
            var order = new Order();

            order.StartProcessing(DateTime.Today);
            var orderEngine = new OrderEngine(ConnectionString, Provider);
            var orderId     = orderEngine.CreateOrder(order);

            orderEngine.DeleteOrder(orderId);
            Assert.IsNull(orderEngine.GetOrder(orderId));
        }