コード例 #1
0
        public async Task Test_Update_OrderItem_StockIsCorrect_Returns_Sucess()
        {
            var productId = Guid.NewGuid();
            var orderid   = Guid.NewGuid();

            var orderItems = new OrderItems
            {
                OrderId     = orderid,
                ProductsQty = new List <ProductQuantityDto> {
                    new ProductQuantityDto {
                        ProductId = productId, Quantity = 15
                    }
                }
            };

            MockSetUp(orderid, productId);
            var handler = new UpdateOrderItemsHandler(Dependencies.Object);
            var result  = await handler.Handle(orderItems);

            Assert.True(result.Success);
            VerifyDependencies();
        }
コード例 #2
0
 protected override async Task <Result <UpdateProductsMessageResponseDto> > CallService(OrderItems objDto)
 {
     return(await _handler.Handle(objDto));
 }