Exemplo n.º 1
0
        public void TestCancelOrderExpectTrue()
        {
            var deleteProduct = orderService.CancelOrder(Guid.Parse("3320d00d-74c3-40a0-a465-6a6e6e936f32"));
            var valConv       = JsonConvert.DeserializeObject(deleteProduct.Content.ToString());
            var _result       = valConv.ToString() == "Success" ? true : false;

            Assert.True(_result);
        }
Exemplo n.º 2
0
        public string CancelOrder(OrderViewModel orderObj)
        {
            OperationsStatusViewModel OperationsStatusViewModelObj = null;

            try
            {
                orderObj.OrderStatus         = "4";
                OperationsStatusViewModelObj = Mapper.Map <OperationsStatus, OperationsStatusViewModel>(_orderBusiness.CancelOrder(Mapper.Map <OrderViewModel, Order> (orderObj)));
                return(JsonConvert.SerializeObject(new { Result = "OK", Records = OperationsStatusViewModelObj }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { Result = "", Message = ex.Message }));
            }
        }
Exemplo n.º 3
0
 public ContentResult CancelOrder(Guid orderId)
 {
     return(order.CancelOrder(orderId));
 }