Example #1
0
        public void Get()
        {
            int validID = GetValidProductID();


            var product = ProductEndpoints.GetProduct(validID).Result;

            Assert.IsTrue(product != null);
        }
Example #2
0
        private int GetValidProductID()
        {
            int validID = 0;

            for (int i = 1; i < 100; i++)
            {
                Product product = ProductEndpoints.GetProduct(i).Result;

                if (product != null && product.ID != 0)
                {
                    validID = product.ID;
                    break;
                }
            }

            return(validID);
        }
Example #3
0
        public async Task <IActionResult> Edit(int id)
        {
            var product = await ProductEndpoints.GetProduct(id);

            return(View(product));
        }