public async void TestCreateOrder()
        {
            var orderLines = new List <OrderLineModel> {
                new OrderLineModel {
                    ProductQuantity = 1,

                    Product = new ProductModel {
                        Name = "Test Product"
                    }
                }
            };

            JsonResult response = (JsonResult)(await mStoreController.CreateOrder(orderLines, "Test"));

            var jsonResponse = (JsonResponse)response.Value;

            Assert.Same(JsonResponse.Success, jsonResponse);
        }
示例#2
0
 public void CreateOrder(Order order)
 {
     _controller.CreateOrder(order);
 }