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(); }
public UpdateOrderProductsConsumer(RabbitMQSettings settings, ISerializer serializer, UpdateOrderItemsHandler handler) : base(settings, serializer, QueueName.UpdateOrderProducts) { _handler = handler; }