Example #1
0
        public void ChangeStockTest()
        {
            ProductChangeStockModel mock   = new ProductChangeStockModel();
            OkObjectResult          result = (OkObjectResult)Controller.GetWithSpecifications(4);
            Product resultItems            = (Product)result.Value;

            Specification[] specifications = resultItems.Specifications.ToArray();
            mock.Product  = resultItems;
            mock.NewStock = resultItems.Stock;

            OkResult resulttest = (OkResult)Controller.ChangeStock(mock);

            Assert.IsInstanceOfType(resulttest, typeof(OkResult));
        }