示例#1
0
        public void When_Add_Products_Method_Is_Called_With_All_The_Valid_Data_Than_It_Returns_Product_Added_Sucessfully()
        {
            var okResult = _ProductController.AddToProductList(new Product()
            {
                ProductId = 123, ProductName = "Watch", ProductCost = 12000
            });
            var SuccessResult = okResult as OkObjectResult;
            var Result        = Convert.ToString(SuccessResult.Value);

            //Assert
            Assert.Equal("{ message = Product Added Successfully }", Result);
        }