public async Task Test_Get_GetAllPost()
        {
            // Arrange
            var res = false;

            // Act
            mockservice.Setup(blogRepo => blogRepo.GetAllPost());
            var result = await _services.GetAllPost();

            if (result != null)
            {
                res = true;
            }
            // Assert
            //writing tset boolean output in text file, that is present in project directory
            File.AppendAllText("../../../../output_revised.txt",
                               "Test_Get_GetAllPost="
                               + res.ToString() + "\n");
        }
Esempio n. 2
0
 public async Task <IEnumerable <BlogPost> > GetBlogPost()
 {
     return(await _blogPostServices.GetAllPost());
 }