Пример #1
0
        public async Task Production_UpdateProductAsync()
        {
            // Arrange
            var controller = new ProductionController(AdventureWorksRepository);

            var id = 1;

            var viewModel = new ProductViewModel
            {
                ProductName   = "New product test II",
                ProductNumber = "XYZ"
            };

            // Act
            var response = await controller.UpdateProduct(id, viewModel) as ObjectResult;

            // Assert
            var value = response.Value as ISingleModelResponse <ProductViewModel>;

            Assert.False(value.DidError);
        }