Ejemplo n.º 1
0
        public IActionResult StartOrder(OrderDetailsInputModel orderDetails)
        {
            var userId = User.GetAuthUserId();

            var result = this.service.StartOrder(orderDetails, userId);

            return(this.Ok(new CodeViewModel()
            {
                Code = result,
            }));
        }
Ejemplo n.º 2
0
        protected void DeepEqualForOrderDetails(OrderDetailsInputModel inputModel, OrderDetailsOutputModel expOutputModel)
        {
            Assert.NotNull(expOutputModel.LocalPrice);
            Assert.NotNull(expOutputModel.ProductBrand);
            Assert.NotNull(expOutputModel.ProductModel);
            Assert.NotNull(expOutputModel.Quantity);
            Assert.NotNull(expOutputModel.SubCategoryName);
            var model       = mapper.Map <OrderDetails>(inputModel);
            var outputModel = mapper.Map <OrderDetailsOutputModel>(model);

            Assert.IsTrue(outputModel.Equals(expOutputModel));
        }