51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DamageAssesment.Api.Questions.Test
|
|
{
|
|
public class CategoryMockData
|
|
{
|
|
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanQuestionCategory>, string)> getOkResponse()
|
|
{
|
|
IEnumerable<Questions.Models.MultiLanQuestionCategory> list = new List<Questions.Models.MultiLanQuestionCategory>();
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
list.Append(new Questions.Models.MultiLanQuestionCategory { Id = i, IconLibrary = "img"+i,IconName="Category "+i });
|
|
}
|
|
return (true, list, null);
|
|
}
|
|
|
|
public static async Task<(bool, Questions.Models.MultiLanQuestionCategory, string)> getOkResponse(int Id)
|
|
{
|
|
var Questions = await getOkResponse();
|
|
var Question = Questions.Item2.FirstOrDefault(s => s.Id == Id);
|
|
return (true, Question, null);
|
|
}
|
|
|
|
public static async Task<(bool, Questions.Models.MultiLanQuestionCategory, string)> getBadRequestResponse()
|
|
{
|
|
return (false, null, "Bad Request");
|
|
}
|
|
|
|
public static async Task<(bool, Questions.Models.MultiLanQuestionCategory, string)> getNotFoundResponse()
|
|
{
|
|
return (false, null, "Not Found");
|
|
}
|
|
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanQuestionCategory>, string)> getNoContentResponse()
|
|
{
|
|
IEnumerable<Questions.Models.MultiLanQuestionCategory> list = new List<Questions.Models.MultiLanQuestionCategory>();
|
|
return (false, list, null);
|
|
}
|
|
|
|
public static async Task<Questions.Models.QuestionCategory> getInputQuestionCategoryData()
|
|
{
|
|
return new Questions.Models.QuestionCategory { Id = 1, IconName = "Category 1",IconLibrary="img 1" };
|
|
|
|
}
|
|
}
|
|
}
|