using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xunit.Sdk; namespace DamageAssesment.Api.Survey.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 Surveys.Models.MultiLanSurvey { Id = i, /*Title = "Survey Title - " + i */}); } return (true, list, null); } public static async Task<(bool, Surveys.Models.MultiLanSurvey, string)> getOkResponse( int Id) { var surveys = await getOkResponse(); var survey = surveys.Item2.FirstOrDefault(s => s.Id == Id); return (true, survey, null); } public static async Task<(bool, Surveys.Models.MultiLanSurvey, string)> getBadRequestResponse() { return (false, null,"Bad Request"); } public static async Task<(bool, Surveys.Models.MultiLanSurvey, 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 getInputSurveyData() { return new Surveys.Models.Survey { Id = 100, /*Title = "Mock survey",*/ IsEnabled= true, StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(90) }; } } }