using System.Text; namespace DamageAssesment.Api.Locations.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 Locations.Models.Region { Id = i, Abbreviation = "AB" + i, Name = "Region " + i }); } return (true, list, null); } public static async Task<(bool, Locations.Models.Region, string)> getOkResponse(int Id) { var regions = await getOkResponse(); var region = regions.Item2.FirstOrDefault(s => s.Id == Id); return (true, region, null); } public static async Task<(bool, IEnumerable, string)> getOkResponseLocation() { IEnumerable list = new List(); for (int i = 0; i < 10; i++) { list.Append(new Locations.Models.Location { Id = i, RegionId = i, Name = "Location" }); } return (true, list, null); } public static async Task<(bool, IEnumerable, string)> getNotFoundResponseLocation() { return (false, null, null); } public static async Task<(bool, Models.Location, string)> getOkResponseLocation(int Id) { var locations = await getOkResponseLocation(); var location = locations.Item2.FirstOrDefault(s => s.Id == Id); return (true, location, null); } public static async Task<(bool, Models.Location, string)> getLocation(bool value, string message) { var location = new Models.Location { Id = 1, LocationCode = "Loc1", RegionId = 1, Name = "Location 1", SchoolType = "US", MaintenanceCenter = "1" }; return (value, location, message); } public static async Task<(bool, Locations.Models.Location, string)> getLocationNotFoundResponse() { return (false, null, "Not Found"); } public static async Task<(bool, Locations.Models.Region, string)> getBadRequestResponse() { return (false, null, "Bad Request"); } public static async Task<(bool, Locations.Models.Region, 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 getInputRegionData() { return new Locations.Models.Region { Id = 99999, Name = "Region 99", Abbreviation = "A99" }; } } }