public static OrderDTO CreateOrder() { var order = new OrderDTO { OrderDate = DateTime.Now, PaymentMethodType = PaymentMethodType.Cash }; _orderBusinessService.Add(order); return(_orderBusinessService.List().Last()); // it is assumed the last order saved is the current order, ideal it should be fetch from the database by Id }
public void WhenAddedOrderIsNullThen_ThrowExecption() { OrderDTO order = null; _orderBusinessService.Add(order); }