public async Task <bool> Testfor_GetAllNotice() { //Arrange var res = false; //Action service.Setup(repos => repos.AllNotice()); var result = await _SchoolServices.AllNotice(); //Assertion if (result != null) { res = true; } //Assert //final result displaying in text file await File.AppendAllTextAsync("../../../../output_revised.txt", "Testfor_GetAllNotice=" + res + "\n"); return(res); }