Example #1
0
        public async Task TestGetInventoryByProductTestAsync()
        {
            // Arrange
            var logger            = LogHelper.GetLogger <ProductionController>();
            var productionService = ServiceMocker.GetProductionService(nameof(TestGetInventoryByProductTestAsync));
            var controller        = new ProductionController(logger, productionService);
            var productID         = 1;
            var warehouseID       = "W0001";

            // Act
            var response = await controller.GetProductInventoryAsync(productID, warehouseID) as ObjectResult;

            var value = response.Value as IListResponse <ProductInventory>;

            controller.Dispose();

            // Assert
            Assert.False(value.DidError);
            Assert.True(value.Model.Count() > 0);
        }