using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DamageAssesment.Api.Answers.Test { public class MockData { public static async Task<(bool, IEnumerable, string)> getOkResponse() { IEnumerable list = new List(); for (int i = 0; i < 10; i++) { list.Append(new Answers.Models.Answer { Id = i, AnswerText = "Yes", Comment = "", QuestionId = i, SurveyResponseId = i }); } return (true, list, null); } public static async Task<(bool, Answers.Models.Answer, string)> getOkResponse(int Id) { var Answers = await getOkResponse(); var Answer = Answers.Item2.FirstOrDefault(s => s.Id == Id); return (true, Answer, null); } public static async Task<(bool, Answers.Models.Answer, string)> getBadRequestResponse() { return (false, null, "Bad Request"); } public static async Task<(bool, Answers.Models.Answer, string)> getNotFoundResponse() { return (false, null, "Not Found"); } public static async Task<(bool, IEnumerable, string)> getNoContentResponse() { IEnumerable list = new List(); return (false, list, null); } public static async Task getInputAnswerData() { return new Answers.Db.Answer { Id = 1, AnswerText = "Yes", Comment = "", QuestionId = 1, SurveyResponseId = 1 }; } } }