using DamageAssesment.Api.Attachments.Models; using System; using System.Collections.Generic; using System.Linq; using System.Net.Mail; using System.Text; using System.Threading.Tasks; namespace DamageAssesment.Api.Attachments.Test { public class MockData { public static async Task<(bool, List, string)> getOkResponse() { List list = new List(); for (int i = 0; i < 10; i++) { list.Add(new Attachments.Models.Attachment() { Id = i, AnswerId = i, URI = Guid.NewGuid().ToString() + "@gmail.com", ResponseId = i, IsDeleted = false, FileName="sample"+i }); } return (true, list, null); } public static async Task GetAttachmentInfo(int id) { List files = new List(); List answerInfos = new List(); files.Add(new FileModel() { AttachmentId = id, FileName = "Sample1", FileContent = "sample", FileExtension = ".jpg" }); answerInfos.Add(new AnswerInfo() { AnswerId = 1, postedFiles = files }); return new AttachmentInfo { ResponseId = 1, Answers = answerInfos }; } public static async Task<(bool, Attachments.Models.Attachment, string)> getOkResponse(int Id) { var Attachments = await getOkResponse(); var Attachment = Attachments.Item2.FirstOrDefault(s => s.Id == Id); return (true, Attachment, null); } public static async Task<(bool, List, string)> getBadRequestResponse() { return (false, null, "Bad Request"); } public static async Task<(bool, Attachments.Models.Attachment, 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> getInputAttachmentData() { List Attachments=new List(); Attachments.Add(new Models.Attachment{ Id = 0, AnswerId = 10, ResponseId = 10, URI = "sample", IsDeleted = false,FileName="sample1" }) ; return Attachments; } } }