public async Task <IEnumerable <Product> > ProductByName(string ProductName)
        {
            //Do code here

            return(await _groceryServices.ProductByName(ProductName));

            //throw new NotImplementedException();
        }
        public async Task <bool> Testfor_Validate_GetProductByName()
        {
            //Arrange
            bool res = false;

            //Act
            groceryservice.Setup(repo => repo.ProductByName(_product.ProductName));
            var result = await _groceryS.ProductByName(_product.ProductName);

            if (result != null)
            {
                res = true;
            }
            //Asert
            //final result displaying in text file
            await File.AppendAllTextAsync("../../../../output_revised.txt", "Testfor_Validate_GetProductByName=" + res + "\n");

            return(res);
        }
示例#3
0
 public async Task <IEnumerable <Product> > ProductByName(string ProductName)
 {
     return(await _groceryServices.ProductByName(ProductName));
 }