diff --git a/DamageAssesmentApi/DamageAssesment.Api.Answers/Controllers/AnswersController.cs b/DamageAssesmentApi/DamageAssesment.Api.Answers/Controllers/AnswersController.cs index a86cbf1..fe225b6 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Answers/Controllers/AnswersController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Answers/Controllers/AnswersController.cs @@ -17,7 +17,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// Get all answers /// - [HttpGet("Answers")] + [HttpGet("answers")] public async Task GetAnswersAsync() { var result = await answerProvider.GetAnswersAsync(); @@ -33,11 +33,11 @@ namespace DamageAssesment.Api.Answers.Controllers /// - [HttpGet("Answers/{Id}")] - public async Task GetAnswerByIdAsync(int Id) + [HttpGet("answers/{id}")] + public async Task GetAnswerByIdAsync(int id) { - var result = await answerProvider.GetAnswerByIdAsync(Id); + var result = await answerProvider.GetAnswerByIdAsync(id); if (result.IsSuccess) { return Ok(result.Answer); @@ -48,7 +48,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// /// Get all answers based on responseId. /// - [HttpGet("Answers/ByResponse/{responseid}")] + [HttpGet("answers/byresponse/{responseid}")] public async Task GetAnswersByResponseId(int responseid) { var result = await this.answerProvider.GetAnswersAsync(responseid); @@ -62,7 +62,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// Get all answers based on questionId. /// - [HttpGet("Answers/ByQuestion/{questionid}")] + [HttpGet("answers/byquestion/{questionid}")] public async Task AnswersByQuestionId(int questionid) { var result = await this.answerProvider.GetAnswersByQuestionAsync(questionid); @@ -76,7 +76,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// Update an existing answer. /// - [HttpPut("Answers")] + [HttpPut("answers")] public async Task UpdateAnswer(Models.Answer answer) { if (answer != null) @@ -97,7 +97,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// Save a new answer. /// - [HttpPost("Answers")] + [HttpPost("answers")] public async Task CreateAnswer(Models.Answer answer) { if (answer != null) @@ -115,7 +115,7 @@ namespace DamageAssesment.Api.Answers.Controllers /// Delete an existing answer. /// - [HttpDelete("Answers/{id}")] + [HttpDelete("answers/{id}")] public async Task DeleteAnswer(int id) { var result = await this.answerProvider.DeleteAnswerAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Controllers/AttachmentsController.cs b/DamageAssesmentApi/DamageAssesment.Api.Attachments/Controllers/AttachmentsController.cs index 0fcec65..16c223c 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Controllers/AttachmentsController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Attachments/Controllers/AttachmentsController.cs @@ -22,7 +22,7 @@ namespace DamageAssesment.Api.Attachments.Controllers /// Get all attachments. /// - [HttpGet("Attachments")] + [HttpGet("attachments")] public async Task GetAttachmentsAsync() { @@ -37,7 +37,7 @@ namespace DamageAssesment.Api.Attachments.Controllers /// /// Get all attachments by attachmentId. /// - [HttpGet("Attachments/{id}")] + [HttpGet("attachments/{id}")] public async Task GetAttachmentbyIdAsync(int id) { @@ -81,7 +81,7 @@ namespace DamageAssesment.Api.Attachments.Controllers /// Save new Attachment(s) /// - [HttpPost("Attachments"), DisableRequestSizeLimit] + [HttpPost("attachments"), DisableRequestSizeLimit] public async Task UploadAttachmentAsync(AttachmentInfo attachmentInfo) { try @@ -108,7 +108,7 @@ namespace DamageAssesment.Api.Attachments.Controllers /// Modify an new attachment. /// - [HttpPut("Attachments"), DisableRequestSizeLimit] + [HttpPut("attachments"), DisableRequestSizeLimit] public async Task UpdateAttachmentAsync(AttachmentInfo attachmentInfo) { try @@ -138,7 +138,7 @@ namespace DamageAssesment.Api.Attachments.Controllers /// /// Delete an existing attachment. /// - [HttpDelete("Attachments/{id}")] + [HttpDelete("attachments/{id}")] public async Task DeleteAttachment(int id) { // database soft delete diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs index f5e0d88..05901c5 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs @@ -19,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// GET request for retrieving employees. /// - [HttpGet("Employees")] + [HttpGet("employees")] public async Task GetEmployeesAsync() { @@ -36,7 +36,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// GET request for retrieving an employee by ID. /// - [HttpGet("Employees/{id}")] + [HttpGet("employees/{id}")] public async Task GetEmployeeByIdAsync(int id) { @@ -53,7 +53,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// PUT request for updating an existing employee. /// /// The updated employee object. - [HttpPut("Employees/{id}")] + [HttpPut("employees/{id}")] public async Task UpdateEmployee(int id, Models.Employee Employee) { if (Employee != null) @@ -75,7 +75,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// POST request for creating a new employee. /// /// The employee information for creating a new employee. - [HttpPost("Employees")] + [HttpPost("employees")] public async Task CreateEmployee(Models.Employee Employee) { if (Employee != null) @@ -93,7 +93,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// DELETE request for deleting an existing employee. /// /// The ID of the employee to be deleted. - [HttpDelete("Employees/{id}")] + [HttpDelete("employees/{id}")] public async Task DeleteEmployee(int id) { var result = await this.EmployeeProvider.DeleteEmployeeAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs b/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs index d9bbea3..cea800d 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs @@ -16,7 +16,7 @@ namespace DamageAssesment.Api.Locations.Controllers /// Get all locations. /// - [HttpGet("Locations")] + [HttpGet("locations")] public async Task GetLocationsAsync() { @@ -32,7 +32,7 @@ namespace DamageAssesment.Api.Locations.Controllers /// Get all locations based on locationdId. /// - [HttpGet("Locations/{id}")] + [HttpGet("locations/{id}")] public async Task GetLocationByIdAsync(int id) { @@ -48,7 +48,7 @@ namespace DamageAssesment.Api.Locations.Controllers /// Update a Location. /// - [HttpPut("Locations/{id}")] + [HttpPut("locations/{id}")] public async Task UpdateLocation(int id, Models.Location Location) { if (Location != null) @@ -66,7 +66,7 @@ namespace DamageAssesment.Api.Locations.Controllers /// Save a new location. /// - [HttpPost("Locations")] + [HttpPost("locations")] public async Task CreateLocation(Models.Location Location) { if (Location != null) @@ -84,7 +84,7 @@ namespace DamageAssesment.Api.Locations.Controllers /// Delete an existing location. /// - [HttpDelete("Locations/{id}")] + [HttpDelete("locations/{id}")] public async Task DeleteLocation(int id) { var result = await this.LocationProvider.DeleteLocationAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Questions/Controllers/QuestionsController.cs b/DamageAssesmentApi/DamageAssesment.Api.Questions/Controllers/QuestionsController.cs index 17024eb..7dec941 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Questions/Controllers/QuestionsController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Questions/Controllers/QuestionsController.cs @@ -20,8 +20,8 @@ namespace DamageAssesment.Api.Questions.Controllers /// // get all questions - [Route("Questions")] - [Route("Questions/{language:alpha}")] + [Route("questions")] + [Route("questions/{language:alpha}")] [HttpGet] public async Task GetQuestionsAsync(string? language) { @@ -37,8 +37,8 @@ namespace DamageAssesment.Api.Questions.Controllers /// /// GET request for retrieving a question by ID. /// - [Route("Questions/{id}/{language:alpha}")] - [Route("Questions/{id:int}")] + [Route("questions/{id}/{language:alpha}")] + [Route("questions/{id:int}")] [HttpGet] public async Task GetQuestionByIdAsync(int id, string? language) { @@ -55,8 +55,8 @@ namespace DamageAssesment.Api.Questions.Controllers /// GET request for retrieving survey questions based on a survey ID. /// Uri: {Optional language}/GetSurveyQuestions/{surveyId} :Default returns question in all languages /// - [Route("Questions/BySurvey/{surveyId:int}")] - [Route("Questions/BySurvey/{surveyId:int}/{language:alpha}")] + [Route("questions/bysurvey/{surveyId:int}")] + [Route("questions/bysurvey/{surveyId:int}/{language:alpha}")] [HttpGet] public async Task GetSurveyQuestions(int surveyId,string? language) { @@ -71,7 +71,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// PUT request for updating a question (multilingual). /// - [HttpPut("Questions")] + [HttpPut("questions")] public async Task UpdateQuestion(Models.Question question) { if (question != null) @@ -92,7 +92,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// POST request for creating a new question (multilingual). /// - [HttpPost("Questions")] + [HttpPost("questions")] public async Task CreateQuestion(Models.Question question) { if (question != null) @@ -110,7 +110,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// DELETE request for deleting a question based on ID. /// - [HttpDelete("Questions/{id}")] + [HttpDelete("questions/{id}")] public async Task DeleteQuestion(int id) { var result = await this.questionsProvider.DeleteQuestionAsync(id); @@ -125,8 +125,8 @@ namespace DamageAssesment.Api.Questions.Controllers /// GET request for retrieving question categories. /// - [HttpGet("Questions/Categories")] - [HttpGet("Questions/Categories/{language:alpha}")] + [HttpGet("questions/categories")] + [HttpGet("questions/categories/{language:alpha}")] public async Task GetQuestionCategoriesAsync(string? language) { var result = await this.questionsProvider.GetQuestionCategoriesAsync(language); @@ -140,8 +140,8 @@ namespace DamageAssesment.Api.Questions.Controllers /// GET request for retrieving a question category by ID. /// - [HttpGet("Questions/Categories/{id:int}")] - [HttpGet("Questions/Categories/{id:int}/{language:alpha}")] + [HttpGet("questions/categories/{id:int}")] + [HttpGet("questions/categories/{id:int}/{language:alpha}")] public async Task GetQuestionCategoryAsync(int id,string? language) { var result = await this.questionsProvider.GetQuestionCategoryAsync(id, language); @@ -157,7 +157,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// PUT request for updating a question category. /// - [HttpPut("Questions/Categories")] + [HttpPut("questions/categories")] public async Task UpdateQuestionCategory(Models.QuestionCategory questionCategory) { if (questionCategory != null) @@ -178,7 +178,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// POST request for creating a new question category. /// - [HttpPost("Questions/Categories")] + [HttpPost("questions/categories")] public async Task CreateQuestionCategory(Models.QuestionCategory questionCategory) { if (questionCategory != null) @@ -196,7 +196,7 @@ namespace DamageAssesment.Api.Questions.Controllers /// DELETE request for deleting a question category based on ID. /// - [HttpDelete("Questions/Categories/{id}")] + [HttpDelete("questions/categories/{id}")] public async Task DeleteQuestionCategory(int id) { var result = await this.questionsProvider.DeleteQuestionCategoryAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Controllers/SurveyResponsesController.cs b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Controllers/SurveyResponsesController.cs index 22d9f6b..bf38838 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Controllers/SurveyResponsesController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Controllers/SurveyResponsesController.cs @@ -17,8 +17,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// GET request for retrieving survey responses. /// - [Route("Responses/{employeeid:int}")] - [Route("Responses")] + [Route("responses/{employeeid:int}")] + [Route("responses")] [HttpGet] public async Task GetSurveyResponsesAsync(int? employeeid) { @@ -36,8 +36,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// /// GET request for retrieving survey responses by survey ID. /// - [Route("Responses/BySurvey/{surveyid:int}/{employeeid:int}")] - [Route("Responses/BySurvey/{surveyid:int}")] + [Route("responses/bysurvey/{surveyid:int}/{employeeid:int}")] + [Route("responses/bysurvey/{surveyid:int}")] [HttpGet] public async Task GetSurveyResponsesAsync(int surveyid, int? employeeid) { @@ -54,8 +54,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// The ID of the survey for which responses are to be retrieved. /// The ID of the location for which responses are to be retrieved. - [Route("Responses/{surveyid:int}/{locationid:int}/{employeeid:int}")] - [Route("Responses/{surveyid:int}/{locationid:int}")] + [Route("responses/{surveyid:int}/{locationid:int}/{employeeid:int}")] + [Route("responses/{surveyid:int}/{locationid:int}")] [HttpGet] public async Task GetSurveyResponsesBySurveyAndLocationAsync(int surveyid, int locationid,int? employeeid) { @@ -73,8 +73,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// The ID of the question for which responses are to be retrieved. /// The answer for which responses are to be retrieved. - [Route("Responses/ByAnswer/{surveyid:int}/{questionid:int}/{answer:alpha}/{employeeid:int}")] - [Route("Responses/ByAnswer/{surveyid:int}/{questionid:int}/{answer:alpha}")] + [Route("responses/byanswer/{surveyid:int}/{questionid:int}/{answer:alpha}/{employeeid:int}")] + [Route("responses/byanswer/{surveyid:int}/{questionid:int}/{answer:alpha}")] [HttpGet] public async Task GetSurveyResponsesByAnswerAsyncAsync(int surveyid, int questionid, string answer, int? employeeid) { @@ -91,8 +91,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// /// The ID of the survey for which answers are to be retrieved. - [Route("Responses/ByRegion/{surveyid:int}")] - [Route("Responses/ByRegion/{surveyid:int}/{employeeid}")] + [Route("responses/byregion/{surveyid:int}")] + [Route("responses/byregion/{surveyid:int}/{employeeid}")] [HttpGet] public async Task GetAnswersByRegionAsync(int surveyid, int? employeeid) { @@ -107,8 +107,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// GET request for retrieving survey responses by survey ID and maintenance center. /// /// The ID of the survey for which responses are to be retrieved. - [Route("Responses/ByMaintenanceCenter/{surveyid:int}/{employeeid:int}")] - [Route("Responses/ByMaintenanceCenter/{surveyid:int}")] + [Route("responses/bymaintenancecenter/{surveyid:int}/{employeeid:int}")] + [Route("responses/bymaintenancecenter/{surveyid:int}")] [HttpGet] public async Task GetAnswersByMaintenaceCentersync(int surveyid, int? employeeid) { @@ -124,7 +124,7 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// /// The ID of the survey response to be retrieved. - [HttpGet("Responses/{id}")] + [HttpGet("responses/{id}")] public async Task GetSurveyResponseByIdAsync(int id) { var result = await this.surveyResponseProvider.GetSurveyResponseByIdAsync(id); @@ -140,7 +140,7 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// /// The survey response object to be created. - [HttpPost("Responses")] + [HttpPost("responses")] public async Task PostSurveysAsync(Models.SurveyResponse surveyResponse) { var result = await this.surveyResponseProvider.PostSurveyResponseAsync(surveyResponse); @@ -156,7 +156,7 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// The ID of the survey response to be updated. /// The updated survey response object. - [HttpPut("Responses/{id}")] + [HttpPut("responses/{id}")] public async Task PutSurveyResponseAsync(int id, Models.SurveyResponse surveyResponse) { var result = await this.surveyResponseProvider.PutSurveyResponseAsync(id, surveyResponse); @@ -173,7 +173,7 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// DELETE request for deleting an existing survey response. /// - [HttpDelete("Responses/{id}")] + [HttpDelete("responses/{id}")] public async Task DeleteSurveyResponseAsync(int id) { var result = await this.surveyResponseProvider.DeleteSurveyResponseAsync(id); @@ -188,7 +188,7 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers /// /// The answers to be submitted for the survey. - [HttpPost("Responses/Answers")] + [HttpPost("responses/answers")] public async Task PostSurveyAnswersAsync(Request request) { var result = await this.surveyResponseProvider.PostSurveyAnswersAsync(request); @@ -199,8 +199,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers return BadRequest(result.ErrorMessage); } - [Route("Responses/Surveys/active/{employeeid:int}")] - [Route("Responses/Surveys/active/{employeeid:int}/{language:alpha}")] + [Route("responses/surveys/active/{employeeid:int}")] + [Route("responses/surveys/active/{employeeid:int}/{language:alpha}")] [HttpGet] public async Task GetActiveSurveysAsync(int employeeid, string? language) { @@ -212,8 +212,8 @@ namespace DamageAssesment.Api.SurveyResponses.Controllers return NoContent(); } - [Route("Responses/Surveys/historic/{employeeid:int}")] - [Route("Responses/Surveys/historic/{employeeid:int}/{language:alpha}")] + [Route("responses/surveys/historic/{employeeid:int}")] + [Route("responses/surveys/historic/{employeeid:int}/{language:alpha}")] [HttpGet] public async Task GetHistoricSurveysAsync(int employeeid, string? language) { diff --git a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/appsettings.json b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/appsettings.json index d7b64fc..4610b25 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/appsettings.json +++ b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/appsettings.json @@ -17,17 +17,17 @@ }, "RessourceSettings": { - "Employee": "/Employees", - "EmployeeById": "/Employees/{0}", - "Question": "/Questions", - "QuestionById": "/Questions/{0}", - "SurveyQuestion": "/Questions/BySurvey/{0}", - "Survey": "/Surveys", - "SurveyById": "/Surveys/{0}", - "Attachment": "/Attachments", - "Answer": "/Answers", - "AnswerByResponse": "/Answers/ByResponse/{0}", - "Location": "/Locations", - "Region": "/Regions" + "Employee": "/employees", + "EmployeeById": "/employees/{0}", + "Question": "/questions", + "QuestionById": "/questions/{0}", + "SurveyQuestion": "/questions/bysurvey/{0}", + "Survey": "/surveys", + "SurveyById": "/surveys/{0}", + "Attachment": "/attachments", + "Answer": "/answers", + "AnswerByResponse": "/answers/byresponse/{0}", + "Location": "/locations", + "Region": "/regions" } } diff --git a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Controllers/SurveysController.cs b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Controllers/SurveysController.cs index 1821c2f..b93120b 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Controllers/SurveysController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Controllers/SurveysController.cs @@ -15,8 +15,8 @@ namespace DamageAssesment.Api.Surveys.Controllers /// /// GET request for retrieving surveys. /// - [Route("Surveys")] - [Route("Surveys/{language:alpha}")] + [Route("surveys")] + [Route("surveys/{language:alpha}")] [HttpGet] public async Task GetSurveysAsync(string? language) { @@ -31,8 +31,8 @@ namespace DamageAssesment.Api.Surveys.Controllers /// /// GET request for retrieving surveys by ID. /// - [Route("Surveys/{id:int}")] - [Route("Surveys/{id:int}/{language:alpha}")] + [Route("surveys/{id:int}")] + [Route("surveys/{id:int}/{language:alpha}")] [HttpGet] public async Task GetSurveysAsync(int id, string? language) { @@ -46,7 +46,7 @@ namespace DamageAssesment.Api.Surveys.Controllers /// /// POST request for creating a new survey. /// - [HttpPost("Surveys")] + [HttpPost("surveys")] public async Task PostSurveysAsync(Models.Survey survey) { var result = await this.surveyProvider.PostSurveyAsync(survey); @@ -59,7 +59,7 @@ namespace DamageAssesment.Api.Surveys.Controllers /// /// PUT request for updating an existing survey (surveyId,Updated Survey data). /// - [HttpPut("Surveys/{id}")] + [HttpPut("surveys/{id}")] public async Task PutSurveysAsync(int id, Models.Survey survey) { var result = await this.surveyProvider.PutSurveyAsync(id, survey); @@ -76,7 +76,7 @@ namespace DamageAssesment.Api.Surveys.Controllers /// /// DELETE request for deleting a survey by ID. /// - [HttpDelete("Surveys/{id}")] + [HttpDelete("surveys/{id}")] public async Task DeleteSurveysAsync(int id) { var result = await this.surveyProvider.DeleteSurveyAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Responses.Test/DamageAssesment.Api.Responses.Test.csproj b/DamageAssesmentApi/DamageAssesment.Responses.Test/DamageAssesment.Api.Responses.Test.csproj new file mode 100644 index 0000000..af7e6a4 --- /dev/null +++ b/DamageAssesmentApi/DamageAssesment.Responses.Test/DamageAssesment.Api.Responses.Test.csproj @@ -0,0 +1,26 @@ + + + + net6.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/DamageAssesmentApi/DamageAssesment.SurveyResponses.Test/SurveyResponsesServiceTest.cs b/DamageAssesmentApi/DamageAssesment.SurveyResponses.Test/SurveyResponsesServiceTest.cs index ffb8a4a..c081e2d 100644 --- a/DamageAssesmentApi/DamageAssesment.SurveyResponses.Test/SurveyResponsesServiceTest.cs +++ b/DamageAssesmentApi/DamageAssesment.SurveyResponses.Test/SurveyResponsesServiceTest.cs @@ -45,7 +45,7 @@ namespace DamageAssesment.SurveyResponses.Test var mockResponse = await MockData.getOkResponse(); mockSurveyResponseService.Setup(service => service.GetSurveyResponsesBySurveyAsync(1,1)).ReturnsAsync(mockResponse); var surveyResponseProvider = new SurveyResponsesController(mockSurveyResponseService.Object); - var result = (OkObjectResult)await surveyResponseProvider.GetSurveyResponsesAsync(1); + var result = (OkObjectResult)await surveyResponseProvider.GetSurveyResponsesAsync(1,1); Assert.Equal(200, result.StatusCode); } @@ -55,7 +55,7 @@ namespace DamageAssesment.SurveyResponses.Test var mockResponse = await MockData.getResponse(); mockSurveyResponseService.Setup(service => service.GetSurveyResponsesBySurveyAsync(1,1)).ReturnsAsync(mockResponse); var surveyResponseProvider = new SurveyResponsesController(mockSurveyResponseService.Object); - var result = (NoContentResult)await surveyResponseProvider.GetSurveyResponsesAsync(1); + var result = (NoContentResult)await surveyResponseProvider.GetSurveyResponsesAsync(1,1); Assert.Equal(204, result.StatusCode); } diff --git a/DamageAssesmentApi/DamageAssesment.sln b/DamageAssesmentApi/DamageAssesment.sln index b92b664..e269606 100644 --- a/DamageAssesmentApi/DamageAssesment.sln +++ b/DamageAssesmentApi/DamageAssesment.sln @@ -17,14 +17,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Locations", "DamageAssesment.Api.Locations\DamageAssesment.Api.Locations.csproj", "{746C67BF-9949-4361-B5D2-358C7607750E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Responses", "DamageAssesment.Api.SurveyResponses\DamageAssesment.Api.Responses.csproj", "{D11808FE-AD1C-4BA6-87FD-9D18B2DC81F2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Questions.Test", "DamageAssesment.Api.QuestionsTest\DamageAssesment.Api.Questions.Test.csproj", "{35CD9231-034D-4999-BCFC-1786DD007ED2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Surveys.Test", "DamageAssesment.Api.Surveys.Test\DamageAssesment.Api.Surveys.Test.csproj", "{ADFB79E3-83C9-454F-A070-49D167BD28CC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Responses.Test", "DamageAssesment.SurveyResponses.Test\DamageAssesment.Api.Responses.Test.csproj", "{6F4B9C9D-CE5D-421A-876F-57D0FEDF8049}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Attachments.Test", "DamageAssesment.Api.Attachments.Test\DamageAssesment.Api.Attachments.Test.csproj", "{730E5718-FCE1-42C0-AB76-EA020896A788}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Locations.Test", "DamageAssesment.Api.Locations.Test\DamageAssesment.Api.Locations.Test.csproj", "{DA68AE47-6825-41ED-9107-5151822FB083}" @@ -41,6 +37,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.DocuLin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.DocuLinks.Test", "DamageAssesment.Api.DocuLinks.Test\DamageAssesment.Api.DocuLinks.Test.csproj", "{A7F17ED7-71D2-4FD0-87E5-D83415078FC0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Responses", "DamageAssesment.Api.SurveyResponses\DamageAssesment.Api.Responses.csproj", "{39AEE725-5F64-46D7-B8AA-5AA4047C46CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.Responses.Test", "DamageAssesment.SurveyResponses.Test\DamageAssesment.Api.Responses.Test.csproj", "{8F0E9915-DD51-48B7-8338-01F0244BD1D7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -63,10 +63,6 @@ Global {746C67BF-9949-4361-B5D2-358C7607750E}.Debug|Any CPU.Build.0 = Debug|Any CPU {746C67BF-9949-4361-B5D2-358C7607750E}.Release|Any CPU.ActiveCfg = Release|Any CPU {746C67BF-9949-4361-B5D2-358C7607750E}.Release|Any CPU.Build.0 = Release|Any CPU - {D11808FE-AD1C-4BA6-87FD-9D18B2DC81F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D11808FE-AD1C-4BA6-87FD-9D18B2DC81F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D11808FE-AD1C-4BA6-87FD-9D18B2DC81F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D11808FE-AD1C-4BA6-87FD-9D18B2DC81F2}.Release|Any CPU.Build.0 = Release|Any CPU {35CD9231-034D-4999-BCFC-1786DD007ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35CD9231-034D-4999-BCFC-1786DD007ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU {35CD9231-034D-4999-BCFC-1786DD007ED2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -75,10 +71,6 @@ Global {ADFB79E3-83C9-454F-A070-49D167BD28CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {ADFB79E3-83C9-454F-A070-49D167BD28CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {ADFB79E3-83C9-454F-A070-49D167BD28CC}.Release|Any CPU.Build.0 = Release|Any CPU - {6F4B9C9D-CE5D-421A-876F-57D0FEDF8049}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F4B9C9D-CE5D-421A-876F-57D0FEDF8049}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F4B9C9D-CE5D-421A-876F-57D0FEDF8049}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F4B9C9D-CE5D-421A-876F-57D0FEDF8049}.Release|Any CPU.Build.0 = Release|Any CPU {730E5718-FCE1-42C0-AB76-EA020896A788}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {730E5718-FCE1-42C0-AB76-EA020896A788}.Debug|Any CPU.Build.0 = Debug|Any CPU {730E5718-FCE1-42C0-AB76-EA020896A788}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -111,6 +103,14 @@ Global {A7F17ED7-71D2-4FD0-87E5-D83415078FC0}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7F17ED7-71D2-4FD0-87E5-D83415078FC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7F17ED7-71D2-4FD0-87E5-D83415078FC0}.Release|Any CPU.Build.0 = Release|Any CPU + {39AEE725-5F64-46D7-B8AA-5AA4047C46CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39AEE725-5F64-46D7-B8AA-5AA4047C46CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39AEE725-5F64-46D7-B8AA-5AA4047C46CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39AEE725-5F64-46D7-B8AA-5AA4047C46CB}.Release|Any CPU.Build.0 = Release|Any CPU + {8F0E9915-DD51-48B7-8338-01F0244BD1D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F0E9915-DD51-48B7-8338-01F0244BD1D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F0E9915-DD51-48B7-8338-01F0244BD1D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F0E9915-DD51-48B7-8338-01F0244BD1D7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE