2023-09-13 00:28:24 -05:00
|
|
|
|
using System.Text;
|
2023-08-15 22:52:30 -05:00
|
|
|
|
|
|
|
|
|
namespace DamageAssesment.Api.Employees.Test
|
|
|
|
|
{
|
|
|
|
|
public class MockData
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public static async Task<(bool, IEnumerable<Employees.Models.Employee>, string)> getOkResponse()
|
|
|
|
|
{
|
|
|
|
|
IEnumerable<Employees.Models.Employee> list = new List<Employees.Models.Employee>();
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
|
{
|
2023-09-13 00:28:24 -05:00
|
|
|
|
list.Append(new Employees.Models.Employee { Id = i, Name = "Emoployee"+i, Email = "abc"+i+"@gmail.com", OfficePhoneNumber = "12345678", BirthDate = DateTime.Now.AddYears(-18-i), IsActive = true, PreferredLanguage = "en" });
|
2023-08-15 22:52:30 -05:00
|
|
|
|
}
|
|
|
|
|
return (true, list, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-09-13 00:28:24 -05:00
|
|
|
|
public static async Task<(bool, Employees.Models.Employee, string)> getOkResponse(int Id)
|
2023-08-15 22:52:30 -05:00
|
|
|
|
{
|
|
|
|
|
var Employees = await getOkResponse();
|
|
|
|
|
var Employee = Employees.Item2.FirstOrDefault(s => s.Id == Id);
|
|
|
|
|
return (true, Employee, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static async Task<(bool, Employees.Models.Employee, string)> getBadRequestResponse()
|
|
|
|
|
{
|
|
|
|
|
return (false, null, "Bad Request");
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-27 10:55:58 -05:00
|
|
|
|
public static async Task<(bool, Models.Employee, string)> getNotFoundResponse()
|
2023-08-15 22:52:30 -05:00
|
|
|
|
{
|
|
|
|
|
return (false, null, "Not Found");
|
|
|
|
|
}
|
2023-08-27 10:55:58 -05:00
|
|
|
|
public static async Task<(bool, IEnumerable<Models.Employee>, string)> getNoContentResponse()
|
2023-08-15 22:52:30 -05:00
|
|
|
|
{
|
|
|
|
|
IEnumerable<Employees.Models.Employee> list = new List<Employees.Models.Employee>();
|
|
|
|
|
return (false, list, null);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-27 10:55:58 -05:00
|
|
|
|
public static async Task<Models.Employee> getInputEmployeeData()
|
2023-08-15 22:52:30 -05:00
|
|
|
|
{
|
2023-09-13 00:28:24 -05:00
|
|
|
|
return new Models.Employee { Id = 1, Name = "ABC1", Email = "abc1@gmail.com", OfficePhoneNumber = "12345678", BirthDate = DateTime.Now.AddYears(-18), IsActive = true, PreferredLanguage = "en" };
|
2023-08-15 22:52:30 -05:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|