diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/MockData.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/MockData.cs index 5be421f..c7a52de 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/MockData.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/MockData.cs @@ -1,9 +1,9 @@  -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; using System.Collections.Generic; using System.Text; -namespace DamageAssesment.Api.SurveyResponses.Test +namespace DamageAssesment.Api.Responses.Test { public class MockData { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/SurveyResponsesServiceTest.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/SurveyResponsesServiceTest.cs index c081e2d..48cec58 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/SurveyResponsesServiceTest.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses.Test/SurveyResponsesServiceTest.cs @@ -1,7 +1,7 @@ -using DamageAssesment.Api.SurveyResponses.Controllers; -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; -using DamageAssesment.Api.SurveyResponses.Test; +using DamageAssesment.Api.Responses.Controllers; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; +using DamageAssesment.Api.Responses.Test; using Microsoft.AspNetCore.Mvc; using Moq; using Xunit; @@ -17,7 +17,7 @@ namespace DamageAssesment.SurveyResponses.Test mockSurveyResponseService = new Mock(); } - [Fact(DisplayName = "Get SurveyResponses - Ok case")] + [Fact(DisplayName = "Get Responses - Ok case")] public async Task GetSurveyResponsesAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -28,7 +28,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses - BadRequest case")] + [Fact(DisplayName = "Get Responses - BadRequest case")] public async Task GetSurveyResponsesAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -38,7 +38,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(400, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by surveyId - Ok case")] + [Fact(DisplayName = "Get Responses by surveyId - Ok case")] public async Task GetSurveyResponsesBySurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -49,7 +49,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by surveyId - NoContent case")] + [Fact(DisplayName = "Get Responses by surveyId - NoContent case")] public async Task GetSurveyResponsesBySurveyAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -62,7 +62,7 @@ namespace DamageAssesment.SurveyResponses.Test - [Fact(DisplayName = "Get SurveyResponses by surveyId and locationId - Ok case")] + [Fact(DisplayName = "Get Responses by surveyId and locationId - Ok case")] public async Task GetSurveyResponsesBySurveyLocationAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -73,7 +73,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by surveyId and locationId - NoContent case")] + [Fact(DisplayName = "Get Responses by surveyId and locationId - NoContent case")] public async Task GetSurveyResponsesBySurveyLocationAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -83,7 +83,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(204, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by surveyId and QuestionId and Answer - Ok case")] + [Fact(DisplayName = "Get Responses by surveyId and QuestionId and Answer - Ok case")] public async Task GetSurveyResponsesBySurveyQuestionAnswerAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -94,7 +94,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by surveyId and QuestionId and Answer - NoContent case")] + [Fact(DisplayName = "Get Responses by surveyId and QuestionId and Answer - NoContent case")] public async Task GetSurveyResponsesBySurveyQuestionAnswerAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -105,7 +105,7 @@ namespace DamageAssesment.SurveyResponses.Test } - [Fact(DisplayName = "Get SurveyResponses by region and surveyId - Ok case")] + [Fact(DisplayName = "Get Responses by region and surveyId - Ok case")] public async Task GetSurveyResponsesByRegionSurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -116,7 +116,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by region and surveyId - NoContent Case")] + [Fact(DisplayName = "Get Responses by region and surveyId - NoContent Case")] public async Task GetSurveyResponsesByRegionSurveyAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -126,7 +126,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(204, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by maintenanceCenter and surveyId - Ok case")] + [Fact(DisplayName = "Get Responses by maintenanceCenter and surveyId - Ok case")] public async Task GetSurveyResponsesMaintenanceCenterSurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -137,7 +137,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by maintenanceCenter and surveyId - No Content Case")] + [Fact(DisplayName = "Get Responses by maintenanceCenter and surveyId - No Content Case")] public async Task GetSurveyResponsesMaintenanceCenterSurveyAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -158,7 +158,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Get SurveyResponses by maintenanceCenter and surveyId - NoContent Case")] + [Fact(DisplayName = "Get Responses by maintenanceCenter and surveyId - NoContent Case")] public async Task GetSurveyResponsesByResponseIdyAsync_ShouldReturnStatusCode204() { var mockResponse = await MockData.getResponse(); @@ -169,7 +169,7 @@ namespace DamageAssesment.SurveyResponses.Test } - [Fact(DisplayName = "Post SurveyResponses - Ok case")] + [Fact(DisplayName = "Post Responses - Ok case")] public async Task PostSurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -180,7 +180,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Post SurveyResponses - BadRequest case")] + [Fact(DisplayName = "Post Responses - BadRequest case")] public async Task PostSurveyAsync_ShouldReturnStatusCode400() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -191,7 +191,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(400, result.StatusCode); } - [Fact(DisplayName = "Put SurveyResponses - Ok case")] + [Fact(DisplayName = "Put Responses - Ok case")] public async Task PutSurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -202,7 +202,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Put SurveyResponses - BadRequest case")] + [Fact(DisplayName = "Put Responses - BadRequest case")] public async Task PutSurveyAsync_ShouldReturnStatusCode404() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -213,7 +213,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(400, result.StatusCode); } - [Fact(DisplayName = "Delete SurveyResponses - Ok case")] + [Fact(DisplayName = "Delete Responses - Ok case")] public async Task DeleteSurveyAsync_ShouldReturnStatusCode200() { SurveyResponse mockRequestObject = await MockData.getSurveyResponseObject(); @@ -224,7 +224,7 @@ namespace DamageAssesment.SurveyResponses.Test Assert.Equal(200, result.StatusCode); } - [Fact(DisplayName = "Delete SurveyResponses - NotFound case")] + [Fact(DisplayName = "Delete Responses - NotFound case")] public async Task DeleteSurveyAsync_ShouldReturnStatusCode404() { var mockResponse = await MockData.getResponse(); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs index bf38838..d5f6192 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Microsoft.AspNetCore.Mvc; -namespace DamageAssesment.Api.SurveyResponses.Controllers +namespace DamageAssesment.Api.Responses.Controllers { [ApiController] public class SurveyResponsesController : ControllerBase diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponse.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponse.cs index 2169097..14704cb 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponse.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponse.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace DamageAssesment.Api.SurveyResponses.Db +namespace DamageAssesment.Api.Responses.Db { public class SurveyResponse { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs index 61726ad..c1fae2d 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -namespace DamageAssesment.Api.SurveyResponses.Db +namespace DamageAssesment.Api.Responses.Db { public class SurveyResponseDbContext:DbContext { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Dockerfile b/DamageAssesmentApi/DamageAssesment.Api.Responses/Dockerfile index 2f736aa..86ed050 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Dockerfile +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Dockerfile @@ -6,10 +6,10 @@ EXPOSE 80 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src -COPY ["DamageAssesment.Api.SurveyResponses/DamageAssesment.Api.Responses.csproj", "DamageAssesment.Api.SurveyResponses/"] -RUN dotnet restore "DamageAssesment.Api.SurveyResponses/DamageAssesment.Api.Responses.csproj" +COPY ["DamageAssesment.Api.Responses/DamageAssesment.Api.Responses.csproj", "DamageAssesment.Api.Responses/"] +RUN dotnet restore "DamageAssesment.Api.Responses/DamageAssesment.Api.Responses.csproj" COPY . . -WORKDIR "/src/DamageAssesment.Api.SurveyResponses" +WORKDIR "/src/DamageAssesment.Api.Responses" RUN dotnet build "DamageAssesment.Api.Responses.csproj" -c Release -o /app/build FROM build AS publish diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAnswerServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAnswerServiceProvider.cs index e947659..43ba9a1 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAnswerServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAnswerServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IAnswerServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAttachmentServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAttachmentServiceProvider.cs index a20c91c..7350071 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAttachmentServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IAttachmentServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IAttachmentServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IEmployeeServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IEmployeeServiceProvider.cs index 62031d5..ef9eb00 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IEmployeeServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IEmployeeServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IEmployeeServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IHttpUtil.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IHttpUtil.cs index e3f1e66..a8578e0 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IHttpUtil.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IHttpUtil.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IHttpUtil { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ILocationServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ILocationServiceProvider.cs index 75db3f1..75945cd 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ILocationServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ILocationServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface ILocationServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IQuestionServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IQuestionServiceProvider.cs index ab5f5ba..5c54e57 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IQuestionServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IQuestionServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IQuestionServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IRegionServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IRegionServiceProvider.cs index 8aeb1f8..be3b1c3 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IRegionServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/IRegionServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface IRegionServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveyServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveyServiceProvider.cs index 2b01d16..64252c9 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveyServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveyServiceProvider.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface ISurveyServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveysResponse.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveysResponse.cs index 2bbab9a..dea50eb 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveysResponse.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Interfaces/ISurveysResponse.cs @@ -1,7 +1,7 @@ -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Models; using Microsoft.AspNetCore.Mvc; -namespace DamageAssesment.Api.SurveyResponses.Interfaces +namespace DamageAssesment.Api.Responses.Interfaces { public interface ISurveysResponse { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Answer.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Answer.cs index d607a2f..d507630 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Answer.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Answer.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Answer { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AnswerRequest.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AnswerRequest.cs index 3d86488..2921faf 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AnswerRequest.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AnswerRequest.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class AnswerRequest { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Attachment.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Attachment.cs index 92ab874..6194789 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Attachment.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Attachment.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Attachment { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AttachmentInfo.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AttachmentInfo.cs index e3e30b9..8c31831 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AttachmentInfo.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/AttachmentInfo.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class AttachmentInfo { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Employee.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Employee.cs index 9a06020..72ceffc 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Employee.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Employee.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Employee { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Location.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Location.cs index 078a5ef..d5996d2 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Location.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Location.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Location { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Question.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Question.cs index 37abb4b..aac31f5 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Question.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Question.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Question { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Region.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Region.cs index 3fc5ad7..0f3ee9d 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Region.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Region.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Region { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Request.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Request.cs index 5060914..322314d 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Request.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Request.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Request { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Survey.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Survey.cs index b47193e..8265046 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Survey.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/Survey.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class Survey { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyQuestion.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyQuestion.cs index d510b4e..da3668f 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyQuestion.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyQuestion.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class SurveyQuestions { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyResponse.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyResponse.cs index 37862ca..56d2048 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyResponse.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyResponse.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class SurveyResponse { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyTranslation.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyTranslation.cs index 29a1b7c..022172f 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyTranslation.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Models/SurveyTranslation.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Models +namespace DamageAssesment.Api.Responses.Models { public class SurveyTranslation { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Profiles/SurveyResponsesProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Profiles/SurveyResponsesProvider.cs index d7c65a0..8208db7 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Profiles/SurveyResponsesProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Profiles/SurveyResponsesProvider.cs @@ -1,4 +1,4 @@ -namespace DamageAssesment.Api.SurveyResponses.Profiles +namespace DamageAssesment.Api.Responses.Profiles { public class SurveyResponsesProvider : AutoMapper.Profile { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Program.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Program.cs index 8d27911..f7b7216 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Program.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Program.cs @@ -1,7 +1,7 @@ -using DamageAssesment.Api.SurveyResponses.Db; -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Services; -using DamageAssesment.Api.SurveyResponses.Providers; +using DamageAssesment.Api.Responses.Db; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Services; +using DamageAssesment.Api.Responses.Providers; using Microsoft.EntityFrameworkCore; using Polly; using System.Reflection; @@ -44,7 +44,7 @@ builder.Services.AddSwaggerGen(c => }); builder.Services.AddDbContext(option => { - option.UseInMemoryDatabase("SurveyResponses"); + option.UseInMemoryDatabase("Responses"); }); var app = builder.Build(); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Providers/SurveyResponsesProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Providers/SurveyResponsesProvider.cs index ffbc181..a33dbf8 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Providers/SurveyResponsesProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Providers/SurveyResponsesProvider.cs @@ -1,10 +1,10 @@ using AutoMapper; -using DamageAssesment.Api.SurveyResponses.Db; -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Db; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Microsoft.EntityFrameworkCore; -namespace DamageAssesment.Api.SurveyResponses.Providers +namespace DamageAssesment.Api.Responses.Providers { public class SurveyResponsesProvider : ISurveysResponse { @@ -40,10 +40,10 @@ namespace DamageAssesment.Api.SurveyResponses.Providers { surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { SurveyId = 1, EmployeeId = 1, LocationId = 1, ClientDevice = "Mobile", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { SurveyId = 1, EmployeeId = 2, LocationId = 2, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); - //surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { Id = 3, SurveyId = 3, EmployeeId = 4, LocationId = 1, ClientDevice = "Mobile", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); - //surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { Id = 4, SurveyId = 4, EmployeeId = 1, LocationId = 2, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "false", CreatedDate = DateTime.Now }); - //surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { Id = 6, SurveyId = 1, EmployeeId = 4, LocationId = 2, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); - //surveyResponseDbContext.SurveyResponses.Add(new Db.SurveyResponse { Id = 7, SurveyId = 1, EmployeeId = 4, LocationId = 3, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "false", CreatedDate = DateTime.Now }); + //surveyResponseDbContext.Responses.Add(new Db.SurveyResponse { Id = 3, SurveyId = 3, EmployeeId = 4, LocationId = 1, ClientDevice = "Mobile", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); + //surveyResponseDbContext.Responses.Add(new Db.SurveyResponse { Id = 4, SurveyId = 4, EmployeeId = 1, LocationId = 2, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "false", CreatedDate = DateTime.Now }); + //surveyResponseDbContext.Responses.Add(new Db.SurveyResponse { Id = 6, SurveyId = 1, EmployeeId = 4, LocationId = 2, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "true", CreatedDate = DateTime.Now }); + //surveyResponseDbContext.Responses.Add(new Db.SurveyResponse { Id = 7, SurveyId = 1, EmployeeId = 4, LocationId = 3, ClientDevice = "Desktop", Latitude = 98.8767, Longitute = -129.9897, KeyAnswerResult = "false", CreatedDate = DateTime.Now }); surveyResponseDbContext.SaveChanges(); } } @@ -851,7 +851,7 @@ namespace DamageAssesment.Api.SurveyResponses.Providers } } - //var surveyResponses = await surveyResponseDbContext.SurveyResponses.Where(x => x.SurveyId == survey.Id).ToListAsync(); + //var surveyResponses = await surveyResponseDbContext.Responses.Where(x => x.SurveyId == survey.Id).ToListAsync(); // var employees = await employeeServiceProvider.getEmployeesAsync(); var answers = await answerServiceProvider.getAnswersAsync(); var attachments = await attachmentServiceProvider.getAttachmentsAsync(); diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AnswerServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AnswerServiceProvider.cs index 695ad3e..5b8eeeb 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AnswerServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AnswerServiceProvider.cs @@ -1,9 +1,9 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class AnswerServiceProvider : ServiceProviderBase, IAnswerServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AttachmentServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AttachmentServiceProvider.cs index 120e60f..bfbce94 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AttachmentServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/AttachmentServiceProvider.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class AttachmentServiceProvider : ServiceProviderBase, IAttachmentServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/EmployeeServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/EmployeeServiceProvider.cs index 8dd1352..22f63de 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/EmployeeServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/EmployeeServiceProvider.cs @@ -1,9 +1,9 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Microsoft.AspNetCore.Mvc.Routing; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class EmployeeServiceProvider : ServiceProviderBase, IEmployeeServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/HttpUtil.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/HttpUtil.cs index 8b4755d..053ffad 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/HttpUtil.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/HttpUtil.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; +using DamageAssesment.Api.Responses.Interfaces; using System.Net.Http.Headers; using System.Text; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class HttpUtil : IHttpUtil { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/LocationServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/LocationServiceProvider.cs index 2e3fa32..e6b36f6 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/LocationServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/LocationServiceProvider.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class LocationServiceProvider :ServiceProviderBase, ILocationServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/QuestionServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/QuestionServiceProvider.cs index 138011f..95086b8 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/QuestionServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/QuestionServiceProvider.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class QuestionServiceProvider : ServiceProviderBase, IQuestionServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/RegionServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/RegionServiceProvider.cs index 091512e..49d3e28 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/RegionServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/RegionServiceProvider.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class RegionServiceProvider : ServiceProviderBase, IRegionServiceProvider { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/ServiceProviderBase.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/ServiceProviderBase.cs index af1aa65..1196f5b 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/ServiceProviderBase.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/ServiceProviderBase.cs @@ -1,6 +1,6 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; +using DamageAssesment.Api.Responses.Interfaces; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class ServiceProviderBase { diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/SurveyServiceProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/SurveyServiceProvider.cs index 19c081a..a77e1a7 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/SurveyServiceProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Services/SurveyServiceProvider.cs @@ -1,8 +1,8 @@ -using DamageAssesment.Api.SurveyResponses.Interfaces; -using DamageAssesment.Api.SurveyResponses.Models; +using DamageAssesment.Api.Responses.Interfaces; +using DamageAssesment.Api.Responses.Models; using Newtonsoft.Json; -namespace DamageAssesment.Api.SurveyResponses.Services +namespace DamageAssesment.Api.Responses.Services { public class SurveyServiceProvider : ServiceProviderBase, ISurveyServiceProvider { diff --git a/DamageAssesmentApi/docker-compose.override.yml b/DamageAssesmentApi/docker-compose.override.yml index 6e8ea42..c05d349 100644 --- a/DamageAssesmentApi/docker-compose.override.yml +++ b/DamageAssesmentApi/docker-compose.override.yml @@ -35,7 +35,7 @@ services: - "6005:80" - damageassesment.api.surveyresponses: + damageassesment.api.responses: environment: - ASPNETCORE_ENVIRONMENT=Development - services__Answers=http://damageassesment.api.answers:80 @@ -62,3 +62,5 @@ services: ports: - "6009:80" + + diff --git a/DamageAssesmentApi/docker-compose.yml b/DamageAssesmentApi/docker-compose.yml index cec6504..f421f5a 100644 --- a/DamageAssesmentApi/docker-compose.yml +++ b/DamageAssesmentApi/docker-compose.yml @@ -35,11 +35,11 @@ services: dockerfile: DamageAssesment.Api.Questions/Dockerfile - damageassesment.api.surveyresponses: - image: ${DOCKER_REGISTRY-}damageassesmentapisurveyresponses - build: - context: . - dockerfile: DamageAssesment.Api.SurveyResponses/Dockerfile + # damageassesment.api.surveyresponses: + # image: ${DOCKER_REGISTRY-}damageassesmentapisurveyresponses + # build: + # context: . + # dockerfile: DamageAssesment.Api.SurveyResponses/Dockerfile damageassesment.api.surveys: @@ -55,3 +55,10 @@ services: context: . dockerfile: DamageAssesment.Api.DocuLinks/Dockerfile + + damageassesment.api.responses: + image: ${DOCKER_REGISTRY-}damageassesmentapiresponses + build: + context: . + dockerfile: DamageAssesment.Api.Responses/Dockerfile + diff --git a/DamageAssesmentApi/launchSettings.json b/DamageAssesmentApi/launchSettings.json index 4c96d28..eebfc00 100644 --- a/DamageAssesmentApi/launchSettings.json +++ b/DamageAssesmentApi/launchSettings.json @@ -11,7 +11,8 @@ "damageassesment.api.questions": "StartDebugging", "damageassesment.api.surveyresponses": "StartDebugging", "damageassesment.api.surveys": "StartDebugging", - "damageassesment.api.doculinks": "StartDebugging" + "damageassesment.api.doculinks": "StartDebugging", + "damageassesment.api.responses": "StartDebugging" } } }