Skip to content

Commit

Permalink
fix naming in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-YousefiTelori committed Nov 12, 2023
1 parent b3ce789 commit 3372623
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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""}}"
,
Expand All @@ -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""}}"
,
Expand All @@ -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""}}"
,
Expand All @@ -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""}}"
,
Expand All @@ -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""}}"
,
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ServiceLanguageContract
}
public class PersonLanguageContract
{
[ContentLanguage]
[ContentLanguage(nameof(PersonContract.Title))]
public List<ServiceLanguageContract> Titles { get; set; }
public PostContract Post { get; set; }
public List<PostContract> Posts { get; set; }
Expand Down

0 comments on commit 3372623

Please sign in to comment.