diff --git a/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/ContentLanguageHelperTest.cs b/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/ContentLanguageHelperTest.cs index 6549226..5255f01 100644 --- a/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/ContentLanguageHelperTest.cs +++ b/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/ContentLanguageHelperTest.cs @@ -29,9 +29,7 @@ async Task OnInitialize() ResourceManager resourceManager = new ResourceManager(); HttpHandler httpHandler = new HttpHandler(resourceManager); await httpHandler.Start(Port); - resourceManager.Append(@$"POST *RequestSkipBody* HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST *RequestSkipBody* HTTP/1.1*RequestSkipBody* {{""language"":""fa-IR"",""key"":""1-1-Title""}}" , @@ -41,9 +39,7 @@ async Task OnInitialize() {""result"":{""Data"": ""Hello My Title Language""},""isSuccess"":true,""error"":null}"); - resourceManager.Append(@$"POST *RequestSkipBody* HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST *RequestSkipBody* HTTP/1.1*RequestSkipBody* {{""language"":""fa-IR"",""key"":""1-1-Content""}}" , @@ -53,9 +49,7 @@ async Task OnInitialize() {""result"":{""Data"": ""Hello My Content Language""},""isSuccess"":true,""error"":null}"); - resourceManager.Append(@$"POST /api/Content/GetAllByKey HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST /api/Content/GetAllByKey HTTP/1.1*RequestSkipBody* {{""key"":""1-1-Title""}}" , @@ -82,9 +76,7 @@ async Task OnInitialize() ""error"": null }"); - resourceManager.Append(@$"POST /api/Content/GetByLanguage HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST /api/Content/GetByLanguage HTTP/1.1*RequestSkipBody* {{""language"":""fa-IR"",""key"":""Title"",""uniqueIdentity"":""1-1""}}" , @@ -103,9 +95,7 @@ async Task OnInitialize() ""isSuccess"": true, ""error"": null }"); - resourceManager.Append(@$"POST /api/Content/GetByLanguage HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST /api/Content/GetByLanguage HTTP/1.1*RequestSkipBody* {{""language"":""fa-IR"",""key"":""Content"",""uniqueIdentity"":""1-1""}}" , @@ -125,11 +115,9 @@ async Task OnInitialize() ""error"": null }"); - resourceManager.Append(@$"POST /api/Content/GetAllByKey HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody* + resourceManager.Append(@$"POST /api/Content/GetAllByKey HTTP/1.1*RequestSkipBody* -{{""key"":""Titles"",""uniqueIdentity"":""1-1""}}" +{{""key"":""Title"",""uniqueIdentity"":""1-1""}}" , @"HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 diff --git a/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/Contracts/Common/PersonLanguageContract.cs b/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/Contracts/Common/PersonLanguageContract.cs index 125f111..44cd7c3 100644 --- a/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/Contracts/Common/PersonLanguageContract.cs +++ b/src/CSharp/EasyMicroservices.ContentsMicroservice.Clients.Tests/Contracts/Common/PersonLanguageContract.cs @@ -15,7 +15,7 @@ public class ServiceLanguageContract } public class PersonLanguageContract { - [ContentLanguage] + [ContentLanguage(nameof(PersonContract.Title))] public List Titles { get; set; } public PostContract Post { get; set; } public List Posts { get; set; }