forked from MDCPS/DamageAssessment_Backend
Update survey response, adding EmployeeId , Location Id as int, adjust end point for ansers submission in batch
This commit is contained in:
@ -5,13 +5,13 @@ namespace DamageAssesment.Api.Questions.Test
|
||||
public class MockData
|
||||
{
|
||||
|
||||
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanQuestion>, string)> getOkResponse()
|
||||
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanguage>, string)> getOkResponse()
|
||||
{
|
||||
IEnumerable<Questions.Models.MultiLanQuestion> list = new List<Questions.Models.MultiLanQuestion>();
|
||||
IEnumerable<Questions.Models.MultiLanguage> list = new List<Questions.Models.MultiLanguage>();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
list.Append(new Questions.Models.MultiLanQuestion { Id = i, TypeText = "Text" + i, SurveyId = 1, QuestionNumber = 1, IsRequired = true, Comment = false, Key = true, CategoryId=i });
|
||||
list.Append(new Questions.Models.MultiLanguage { Id = i, TypeText = "Text" + i, SurveyId = 1, QuestionNumber = 1, IsRequired = true, Comment = false, Key = true, CategoryId=i });
|
||||
}
|
||||
return (true, list, null);
|
||||
}
|
||||
@ -23,38 +23,38 @@ namespace DamageAssesment.Api.Questions.Test
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
List<Models.MultiLanQuestion> question = new List<Models.MultiLanQuestion>();
|
||||
question.Add(new Models.MultiLanQuestion { Id = i, TypeText = "Text" + i, SurveyId = 1, QuestionNumber = 1, IsRequired = true, Comment = false, Key = true, CategoryId = i });
|
||||
List<Models.MultiLanguage> question = new List<Models.MultiLanguage>();
|
||||
question.Add(new Models.MultiLanguage { Id = i, TypeText = "Text" + i, SurveyId = 1, QuestionNumber = 1, IsRequired = true, Comment = false, Key = true, CategoryId = i });
|
||||
list.Append(new Questions.Models.SurveyQuestions
|
||||
{
|
||||
CategoryId = i,
|
||||
IconLibrary = "img" + i,
|
||||
IconName = "Category " + i,
|
||||
Questions = question
|
||||
QuestionsText = question
|
||||
});
|
||||
}
|
||||
return (true, list, null);
|
||||
}
|
||||
|
||||
public static async Task<(bool, Questions.Models.MultiLanQuestion, string)> getOkResponse(int Id)
|
||||
public static async Task<(bool, Questions.Models.MultiLanguage, 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.MultiLanQuestion, string)> getBadRequestResponse()
|
||||
public static async Task<(bool, Questions.Models.MultiLanguage, string)> getBadRequestResponse()
|
||||
{
|
||||
return (false, null, "Bad Request");
|
||||
}
|
||||
|
||||
public static async Task<(bool, Questions.Models.MultiLanQuestion, string)> getNotFoundResponse()
|
||||
public static async Task<(bool, Questions.Models.MultiLanguage, string)> getNotFoundResponse()
|
||||
{
|
||||
return (false, null, "Not Found");
|
||||
}
|
||||
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanQuestion>, string)> getNoContentResponse()
|
||||
public static async Task<(bool, IEnumerable<Questions.Models.MultiLanguage>, string)> getNoContentResponse()
|
||||
{
|
||||
IEnumerable<Questions.Models.MultiLanQuestion> list = new List<Questions.Models.MultiLanQuestion>();
|
||||
IEnumerable<Questions.Models.MultiLanguage> list = new List<Questions.Models.MultiLanguage>();
|
||||
return (false, list, null);
|
||||
}
|
||||
public static async Task<(bool, List<Questions.Models.SurveyQuestions>, string)> getNoSurveyContentResponse()
|
||||
|
Reference in New Issue
Block a user