Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RiabushenkoA committed Feb 5, 2025
1 parent 9a223a1 commit 63e32c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,4 @@ FodyWeavers.xsd
/SystranTests/TestFiles/Translate_output.txt
/SystranTests/TestFiles/Translate_output_translated.txt
/Tests.Systran/appsettings.json
/Tests.Systran/appsettings.json
2 changes: 1 addition & 1 deletion Apps.Systran/Actions/DictionaryActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task<CreateDictionaryResponse> CreateDictionary(
importEntriesRequest.AddFile("inputFile",
stream.ToArray(),
"ConvertedDictionary.tsv",
"text/plain");
"text/xml");
}

var importResponse = await Client.ExecuteWithErrorHandling<ImportResponse>(importEntriesRequest);
Expand Down
2 changes: 1 addition & 1 deletion Apps.Systran/Api/SystranClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override Exception ConfigureErrorException(RestResponse response)

if (errors != null && !string.IsNullOrEmpty(errors.Message))
{
return new($"Systran API Error: {errors.Message}");
throw new PluginApplicationException($"Systran API Error: {errors.Message}");
}

return new("Unknown error");
Expand Down
3 changes: 3 additions & 0 deletions Tests.Systran/Tests.Systran.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down

0 comments on commit 63e32c8

Please sign in to comment.