diff --git a/Crowdin.sln b/Crowdin.sln index 7f1cbd3c..5962555b 100644 --- a/Crowdin.sln +++ b/Crowdin.sln @@ -1,18 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{582FDBF8-1C4D-45E8-B9FC-0E3B10510287}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{303E8173-0F2B-4F6C-A9D7-170EAB8461DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A73C101F-4383-42BE-B624-DB88836FE6B5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crowdin.Api", "src\Crowdin.Api\Crowdin.Api.csproj", "{D71FBEB4-C2D5-4B8D-A48A-303815807DF5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crowdin.Api", "src\Crowdin.Api\Crowdin.Api.csproj", "{D71FBEB4-C2D5-4B8D-A48A-303815807DF5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crowdin.Api.Tests", "tests\Crowdin.Api.Tests\Crowdin.Api.Tests.csproj", "{304B7B61-1620-4FFF-967B-BB40F4B60F2A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crowdin.Api.UnitTesting", "tests\Crowdin.Api.UnitTesting\Crowdin.Api.UnitTesting.csproj", "{304B7B61-1620-4FFF-967B-BB40F4B60F2A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crowdin.Api.Samples", "samples\Crowdin.Api.Samples\Crowdin.Api.Samples.csproj", "{A4B9BA6F-97B1-441C-81E6-4EED514C9521}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crowdin.Api.Samples", "samples\Crowdin.Api.Samples\Crowdin.Api.Samples.csproj", "{A4B9BA6F-97B1-441C-81E6-4EED514C9521}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crowdin.Api.Samples.Actions", "samples\Crowdin.Api.Samples.Actions\Crowdin.Api.Samples.Actions.csproj", "{92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crowdin.Api.Samples.Actions", "samples\Crowdin.Api.Samples.Actions\Crowdin.Api.Samples.Actions.csproj", "{92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,19 +27,22 @@ Global {D71FBEB4-C2D5-4B8D-A48A-303815807DF5}.Debug|Any CPU.Build.0 = Debug|Any CPU {D71FBEB4-C2D5-4B8D-A48A-303815807DF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {D71FBEB4-C2D5-4B8D-A48A-303815807DF5}.Release|Any CPU.Build.0 = Release|Any CPU - {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Release|Any CPU.Build.0 = Release|Any CPU {304B7B61-1620-4FFF-967B-BB40F4B60F2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {304B7B61-1620-4FFF-967B-BB40F4B60F2A}.Debug|Any CPU.Build.0 = Debug|Any CPU {304B7B61-1620-4FFF-967B-BB40F4B60F2A}.Release|Any CPU.ActiveCfg = Release|Any CPU {304B7B61-1620-4FFF-967B-BB40F4B60F2A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4B9BA6F-97B1-441C-81E6-4EED514C9521}.Release|Any CPU.Build.0 = Release|Any CPU {92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}.Debug|Any CPU.Build.0 = Debug|Any CPU {92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}.Release|Any CPU.ActiveCfg = Release|Any CPU {92F23B17-3B1C-4098-ACAD-781F1E3BBAA1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection GlobalSection(NestedProjects) = preSolution {D71FBEB4-C2D5-4B8D-A48A-303815807DF5} = {582FDBF8-1C4D-45E8-B9FC-0E3B10510287} {304B7B61-1620-4FFF-967B-BB40F4B60F2A} = {303E8173-0F2B-4F6C-A9D7-170EAB8461DE} diff --git a/README.md b/README.md index bd4ab308..9a91bcb7 100644 --- a/README.md +++ b/README.md @@ -39,16 +39,16 @@ Install via NuGet: ``` // Package Manager -Install-Package Crowdin.Api -Version 2.26.0 +Install-Package Crowdin.Api -Version 2.27.0 // .Net CLI -dotnet add package Crowdin.Api --version 2.26.0 +dotnet add package Crowdin.Api --version 2.27.0 // Package Reference - + // Paket CLI -paket add Crowdin.Api --version 2.26.0 +paket add Crowdin.Api --version 2.27.0 ``` ### Usage examples diff --git a/src/Crowdin.Api/Core/AssemblyInfo.cs b/src/Crowdin.Api/Core/AssemblyInfo.cs index 7a6602c6..463585b5 100644 --- a/src/Crowdin.Api/Core/AssemblyInfo.cs +++ b/src/Crowdin.Api/Core/AssemblyInfo.cs @@ -1,5 +1,5 @@  using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Crowdin.Api.Tests")] +[assembly: InternalsVisibleTo("Crowdin.Api.UnitTesting")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // for Moq \ No newline at end of file diff --git a/src/Crowdin.Api/Crowdin.Api.csproj b/src/Crowdin.Api/Crowdin.Api.csproj index b9676afb..399a4cc7 100644 --- a/src/Crowdin.Api/Crowdin.Api.csproj +++ b/src/Crowdin.Api/Crowdin.Api.csproj @@ -1,7 +1,7 @@ - 2.26.0 + 2.27.0 netstandard2.0 8 diff --git a/src/Crowdin.Api/Translations/PreTranslationPatch.cs b/src/Crowdin.Api/Translations/PreTranslationPatch.cs new file mode 100644 index 00000000..3672fa6d --- /dev/null +++ b/src/Crowdin.Api/Translations/PreTranslationPatch.cs @@ -0,0 +1,21 @@ + +using System.ComponentModel; +using JetBrains.Annotations; +using Newtonsoft.Json; + +namespace Crowdin.Api.Translations +{ + [PublicAPI] + public class PreTranslationPatch : PatchEntry + { + [JsonProperty("path")] + public PreTranslationPatchPath Path { get; set; } + } + + [PublicAPI] + public enum PreTranslationPatchPath + { + [Description("/status")] + Status + } +} \ No newline at end of file diff --git a/src/Crowdin.Api/Translations/TranslationsApiExecutor.cs b/src/Crowdin.Api/Translations/TranslationsApiExecutor.cs index fb5dd131..7718f046 100644 --- a/src/Crowdin.Api/Translations/TranslationsApiExecutor.cs +++ b/src/Crowdin.Api/Translations/TranslationsApiExecutor.cs @@ -26,6 +26,42 @@ public TranslationsApiExecutor(ICrowdinApiClient apiClient, IJsonParser jsonPars _jsonParser = jsonParser; } + /// + /// List Pre-Translations. Documentation: + /// Crowdin API + /// Crowdin String Based API + /// Crowdin Enterprise API + /// + [PublicAPI] + public async Task> ListPreTranslations( + int projectId, + int limit = 25, + int offset = 0) + { + var url = $"/projects/{projectId}/pre-translations"; + + IDictionary queryParams = Utils.CreateQueryParamsFromPaging(limit, offset); + CrowdinApiResult result = await _apiClient.SendGetRequest(url, queryParams); + return _jsonParser.ParseResponseList(result.JsonObject); + } + + /// + /// Edit Pre-Translation. Documentation: + /// Crowdin API + /// Crowdin String Based API + /// Crowdin Enterprise API + /// + [PublicAPI] + public async Task EditPreTranslation( + int projectId, + string preTranslationId, + IEnumerable patches) + { + var url = $"/projects/{projectId}/pre-translations/{preTranslationId}"; + CrowdinApiResult result = await _apiClient.SendPatchRequest(url, patches); + return _jsonParser.ParseResponseObject(result.JsonObject); + } + /// /// Get pre-translation status. Documentation: /// Crowdin API diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_FineTuningDatasets.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/AI_FineTuningDatasets.Designer.cs deleted file mode 100644 index 9af540d5..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_FineTuningDatasets.Designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class AI_FineTuningDatasets { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AI_FineTuningDatasets() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_FineTuningDatasets", typeof(AI_FineTuningDatasets).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string GenerateAiPromptFineTuningDataset_Request { - get { - return ResourceManager.GetString("GenerateAiPromptFineTuningDataset_Request", resourceCulture); - } - } - - internal static string CommonResponses_AiFineTuningDataset { - get { - return ResourceManager.GetString("CommonResponses_AiFineTuningDataset", resourceCulture); - } - } - - internal static string CreateAiPromptFineTuningJob_Request { - get { - return ResourceManager.GetString("CreateAiPromptFineTuningJob_Request", resourceCulture); - } - } - - internal static string CommonResponses_AiFineTuningJob { - get { - return ResourceManager.GetString("CommonResponses_AiFineTuningJob", resourceCulture); - } - } - - internal static string CommonResponses_DownloadLink { - get { - return ResourceManager.GetString("CommonResponses_DownloadLink", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Prompts.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/AI_Prompts.Designer.cs deleted file mode 100644 index 497da7c0..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_Prompts.Designer.cs +++ /dev/null @@ -1,90 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class AI_Prompts { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AI_Prompts() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_Prompts", typeof(AI_Prompts).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string CommonResponses_Multi { - get { - return ResourceManager.GetString("CommonResponses_Multi", resourceCulture); - } - } - - internal static string CommonResponses_Single { - get { - return ResourceManager.GetString("CommonResponses_Single", resourceCulture); - } - } - - internal static string AddAiPrompt_Request { - get { - return ResourceManager.GetString("AddAiPrompt_Request", resourceCulture); - } - } - - internal static string EditAiPrompt_Request { - get { - return ResourceManager.GetString("EditAiPrompt_Request", resourceCulture); - } - } - - internal static string CommonResponses_AiPromptCompletion { - get { - return ResourceManager.GetString("CommonResponses_AiPromptCompletion", resourceCulture); - } - } - - internal static string GenerateAiPromptCompletion_Request { - get { - return ResourceManager.GetString("GenerateAiPromptCompletion_Request", resourceCulture); - } - } - - internal static string DownloadAiPromptCompletion_Response { - get { - return ResourceManager.GetString("DownloadAiPromptCompletion_Response", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Reports.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/AI_Reports.Designer.cs deleted file mode 100644 index f84823cb..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_Reports.Designer.cs +++ /dev/null @@ -1,66 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class AI_Reports { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AI_Reports() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_Reports", typeof(AI_Reports).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string GenerateAiReport_Request { - get { - return ResourceManager.GetString("GenerateAiReport_Request", resourceCulture); - } - } - - internal static string CommonResponses_AiReportGenerationStatus { - get { - return ResourceManager.GetString("CommonResponses_AiReportGenerationStatus", resourceCulture); - } - } - - internal static string DownloadAiReport_Response { - get { - return ResourceManager.GetString("DownloadAiReport_Response", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Settings.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/AI_Settings.Designer.cs deleted file mode 100644 index cc6a4d74..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_Settings.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class AI_Settings { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AI_Settings() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_Settings", typeof(AI_Settings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string CommonResponses_AiSettings { - get { - return ResourceManager.GetString("CommonResponses_AiSettings", resourceCulture); - } - } - - internal static string EditAiSettings_Request { - get { - return ResourceManager.GetString("EditAiSettings_Request", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Branches.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Branches.Designer.cs deleted file mode 100644 index 405ee77c..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Branches.Designer.cs +++ /dev/null @@ -1,102 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Branches { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Branches() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Branches", typeof(Branches).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Response_Common_Multi { - get { - return ResourceManager.GetString("Response_Common_Multi", resourceCulture); - } - } - - internal static string Request_AddBranch { - get { - return ResourceManager.GetString("Request_AddBranch", resourceCulture); - } - } - - internal static string Response_Common_Single { - get { - return ResourceManager.GetString("Response_Common_Single", resourceCulture); - } - } - - internal static string Request_EditBranch { - get { - return ResourceManager.GetString("Request_EditBranch", resourceCulture); - } - } - - internal static string Request_CloneBranch { - get { - return ResourceManager.GetString("Request_CloneBranch", resourceCulture); - } - } - - internal static string Response_BranchCloneStatus { - get { - return ResourceManager.GetString("Response_BranchCloneStatus", resourceCulture); - } - } - - internal static string Request_MergeBranch { - get { - return ResourceManager.GetString("Request_MergeBranch", resourceCulture); - } - } - - internal static string Response_BranchMergeStatus { - get { - return ResourceManager.GetString("Response_BranchMergeStatus", resourceCulture); - } - } - - internal static string Response_BranchMergeSummary { - get { - return ResourceManager.GetString("Response_BranchMergeSummary", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Core_BugCases.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Core_BugCases.Designer.cs deleted file mode 100644 index f9dd2e66..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Core_BugCases.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Core_BugCases { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Core_BugCases() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Core_BugCases", typeof(Core_BugCases).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Response_OrgWebhook_HeadersArray { - get { - return ResourceManager.GetString("Response_OrgWebhook_HeadersArray", resourceCulture); - } - } - - internal static string Response_ProjectSettings_TmPenalties { - get { - return ResourceManager.GetString("Response_ProjectSettings_TmPenalties", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Labels.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Labels.Designer.cs deleted file mode 100644 index cbf085cf..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Labels.Designer.cs +++ /dev/null @@ -1,90 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Labels { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Labels() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Labels", typeof(Labels).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string AddLabel_Request { - get { - return ResourceManager.GetString("AddLabel_Request", resourceCulture); - } - } - - internal static string AddLabel_Response { - get { - return ResourceManager.GetString("AddLabel_Response", resourceCulture); - } - } - - internal static string AssignLabelToStrings_Request { - get { - return ResourceManager.GetString("AssignLabelToStrings_Request", resourceCulture); - } - } - - internal static string AssignLabelToStrings_Response { - get { - return ResourceManager.GetString("AssignLabelToStrings_Response", resourceCulture); - } - } - - internal static string AssignLabelToScreenshots_Request { - get { - return ResourceManager.GetString("AssignLabelToScreenshots_Request", resourceCulture); - } - } - - internal static string CommonResponses_LabelToScreenshots { - get { - return ResourceManager.GetString("CommonResponses_LabelToScreenshots", resourceCulture); - } - } - - internal static string ListLabels_Response { - get { - return ResourceManager.GetString("ListLabels_Response", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Reports.Designer.cs deleted file mode 100644 index 2ffc2ef1..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Reports.Designer.cs +++ /dev/null @@ -1,102 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Reports { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Reports() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Reports", typeof(Reports).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string GenerateReport_Request { - get { - return ResourceManager.GetString("GenerateReport_Request", resourceCulture); - } - } - - internal static string CostEstimationPostEditing_GeneralSchema_Request { - get { - return ResourceManager.GetString("CostEstimationPostEditing_GeneralSchema_Request", resourceCulture); - } - } - - internal static string CostEstimationPostEditing_ByTaskSchema_Request { - get { - return ResourceManager.GetString("CostEstimationPostEditing_ByTaskSchema_Request", resourceCulture); - } - } - - internal static string TranslationCostsPostEditing_GeneralSchema_Request { - get { - return ResourceManager.GetString("TranslationCostsPostEditing_GeneralSchema_Request", resourceCulture); - } - } - - internal static string TranslationCostsPostEditing_ByTaskSchema_Request { - get { - return ResourceManager.GetString("TranslationCostsPostEditing_ByTaskSchema_Request", resourceCulture); - } - } - - internal static string Group_TranslationCostsPostEditing_GeneralSchema_Request { - get { - return ResourceManager.GetString("Group_TranslationCostsPostEditing_GeneralSchema_Request", resourceCulture); - } - } - - internal static string PreTranslateEfficiency_General_Request { - get { - return ResourceManager.GetString("PreTranslateEfficiency_General_Request", resourceCulture); - } - } - - internal static string CommonResponses_ReportStatus { - get { - return ResourceManager.GetString("CommonResponses_ReportStatus", resourceCulture); - } - } - - internal static string PreTranslateEfficiency_ByTask_Request { - get { - return ResourceManager.GetString("PreTranslateEfficiency_ByTask_Request", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports_Archives.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Reports_Archives.Designer.cs deleted file mode 100644 index d9ee8705..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Reports_Archives.Designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Reports_Archives { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Reports_Archives() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Reports_Archives", typeof(Reports_Archives).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Response_Common_Multi { - get { - return ResourceManager.GetString("Response_Common_Multi", resourceCulture); - } - } - - internal static string Response_Common_Single { - get { - return ResourceManager.GetString("Response_Common_Single", resourceCulture); - } - } - - internal static string Response_GroupReportStatus { - get { - return ResourceManager.GetString("Response_GroupReportStatus", resourceCulture); - } - } - - internal static string Request_ExportReportArchive { - get { - return ResourceManager.GetString("Request_ExportReportArchive", resourceCulture); - } - } - - internal static string Response_DownloadLink { - get { - return ResourceManager.GetString("Response_DownloadLink", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Screenshots.Designer.cs deleted file mode 100644 index ccc78d60..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots.Designer.cs +++ /dev/null @@ -1,82 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Screenshots { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Screenshots() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Screenshots", typeof(Screenshots).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string AddScreenshot_Request { - get { - return ResourceManager.GetString("AddScreenshot_Request", resourceCulture); - } - } - - internal static string AddScreenshot_Response { - get { - return ResourceManager.GetString("AddScreenshot_Response", resourceCulture); - } - } - - internal static string EditScreenshot_Response { - get { - return ResourceManager.GetString("EditScreenshot_Response", resourceCulture); - } - } - - internal static string GetScreenshot_Response - { - get - { - return ResourceManager.GetString("GetScreenshot_Response", resourceCulture); - } - } - - internal static string ListScreenshots_Response - { - get - { - return ResourceManager.GetString("ListScreenshots_Response", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SecurityLogs.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/SecurityLogs.Designer.cs deleted file mode 100644 index c66861a0..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/SecurityLogs.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class SecurityLogs { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal SecurityLogs() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.SecurityLogs", typeof(SecurityLogs).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string ListUserSecurityLogs_Response { - get { - return ResourceManager.GetString("ListUserSecurityLogs_Response", resourceCulture); - } - } - - internal static string GetUserSecurityLog_Response { - get { - return ResourceManager.GetString("GetUserSecurityLog_Response", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SourceStrings.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/SourceStrings.Designer.cs deleted file mode 100644 index 1381d6e3..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/SourceStrings.Designer.cs +++ /dev/null @@ -1,84 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class SourceStrings { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal SourceStrings() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.SourceStrings", typeof(SourceStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string StringBatchOperations_Response { - get { - return ResourceManager.GetString("StringBatchOperations_Response", resourceCulture); - } - } - - internal static string StringBatchOperations_Request { - get { - return ResourceManager.GetString("StringBatchOperations_Request", resourceCulture); - } - } - - internal static string CommonResponses_SingleStringInArray { - get { - return ResourceManager.GetString("CommonResponses_SingleStringInArray", resourceCulture); - } - } - - internal static string StringBatchOperations_Response_NoPagination { - get { - return ResourceManager.GetString("StringBatchOperations_Response_NoPagination", resourceCulture); - } - } - - internal static string CommonResponses_UploadStrings { - get { - return ResourceManager.GetString("CommonResponses_UploadStrings", resourceCulture); - } - } - - internal static string UploadStrings_Request { - get { - return ResourceManager.GetString("UploadStrings_Request", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Storage.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Storage.Designer.cs deleted file mode 100644 index 42ec6783..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Storage.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Storage { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Storage() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Storage", typeof(Storage).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string ListStorages { - get { - return ResourceManager.GetString("ListStorages", resourceCulture); - } - } - - internal static string AddStorageResponse { - get { - return ResourceManager.GetString("AddStorageResponse", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Tasks.Designer.cs b/tests/Crowdin.Api.Tests/Core/Resources/Tasks.Designer.cs deleted file mode 100644 index 47487711..00000000 --- a/tests/Crowdin.Api.Tests/Core/Resources/Tasks.Designer.cs +++ /dev/null @@ -1,96 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Tasks { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Tasks() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Tasks", typeof(Tasks).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string AddTask_RightRequestJson_VendorGengo_ToneNotSet { - get { - return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneNotSet", resourceCulture); - } - } - - internal static string AddTask_RightRequestJson_VendorGengo_ToneInformal { - get { - return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneInformal", resourceCulture); - } - } - - internal static string AddTask_RightRequestJson_VendorGengo_ToneOther { - get { - return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneOther", resourceCulture); - } - } - - internal static string AddTask_RightRequestJson_VendorManual { - get { - return ResourceManager.GetString("AddTask_RightRequestJson_VendorManual", resourceCulture); - } - } - - internal static string Request_PendingTaskCreateForm { - get { - return ResourceManager.GetString("Request_PendingTaskCreateForm", resourceCulture); - } - } - - internal static string Request_CrowdinLanguageServicePendingTaskCreateForm { - get { - return ResourceManager.GetString("Request_CrowdinLanguageServicePendingTaskCreateForm", resourceCulture); - } - } - - internal static string Request_VendorManualPendingTaskCreateForm { - get { - return ResourceManager.GetString("Request_VendorManualPendingTaskCreateForm", resourceCulture); - } - } - - internal static string Request_EnterprisePendingTaskCreateForm { - get { - return ResourceManager.GetString("Request_EnterprisePendingTaskCreateForm", resourceCulture); - } - } - } -} diff --git a/tests/Crowdin.Api.Tests/Crowdin.Api.Tests.csproj b/tests/Crowdin.Api.Tests/Crowdin.Api.Tests.csproj deleted file mode 100644 index 0dc81623..00000000 --- a/tests/Crowdin.Api.Tests/Crowdin.Api.Tests.csproj +++ /dev/null @@ -1,492 +0,0 @@ - - - - net6.0 - enable - false - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - - 0618 - - - - - ResXFileCodeGenerator - Clients.Designer.cs - - - ResXFileCodeGenerator - Translations.Designer.cs - - - ResXFileCodeGenerator - Storage.Designer.cs - - - ResXFileCodeGenerator - SourceFiles.Designer.cs - - - ResXFileCodeGenerator - Projects.Designer.cs - - - ResXFileCodeGenerator - Reports.Designer.cs - - - ResXFileCodeGenerator - Tasks.Designer.cs - - - ResXFileCodeGenerator - Dictionaries.Designer.cs - - - ResXFileCodeGenerator - Distributions.Designer.cs - - - ResXFileCodeGenerator - Glossaries.Designer.cs - - - ResXFileCodeGenerator - Glossaries_Terms.Designer.cs - - - ResXFileCodeGenerator - Labels.Designer.cs - - - ResXFileCodeGenerator - Languages.Designer.cs - - - ResXFileCodeGenerator - MachineTranslationEngines.Designer.cs - - - ResXFileCodeGenerator - Screenshots.Designer.cs - - - ResXFileCodeGenerator - Screenshots_Tags.Designer.cs - - - ResXFileCodeGenerator - StringTranslations.Designer.cs - - - ResXFileCodeGenerator - StringTranslations_Votes.Designer.cs - - - ResXFileCodeGenerator - Teams.Designer.cs - - - ResXFileCodeGenerator - Webhooks.Designer.cs - - - ResXFileCodeGenerator - Users.Designer.cs - - - ResXFileCodeGenerator - Bundles.Designer.cs - - - ResXFileCodeGenerator - Reports_SettingsTemplates.Designer.cs - - - ResXFileCodeGenerator - Glossaries_Concepts.Designer.cs - - - ResXFileCodeGenerator - Workflows.Designer.cs - - - ResXFileCodeGenerator - Projects_FileFormatSettings.Designer.cs - - - ResXFileCodeGenerator - Tasks_SettingsTemplates.Designer.cs - - - ResXFileCodeGenerator - TranslationMemory.Designer.cs - - - ResXFileCodeGenerator - TranslationMemory_Segments.Designer.cs - - - ResXFileCodeGenerator - Webhooks_Organization.Designer.cs - - - ResXFileCodeGenerator - SourceStrings.Designer.cs - - - ResXFileCodeGenerator - Core_ErrorResponses.Designer.cs - - - ResXFileCodeGenerator - Core_BugCases.Designer.cs - - - ResXFileCodeGenerator - Notifications.Designer.cs - - - ResXFileCodeGenerator - Projects_StringsExporterSettings.Designer.cs - - - ResXFileCodeGenerator - Applications.Designer.cs - - - ResXFileCodeGenerator - SecurityLogs.Designer.cs - - - ResXFileCodeGenerator - Fields.Designer.cs - - - ResXFileCodeGenerator - AI_Prompts.Designer.cs - - - ResXFileCodeGenerator - AI_Providers.Designer.cs - - - ResXFileCodeGenerator - AI_Misc.Designer.cs - - - ResXFileCodeGenerator - Branches.Designer.cs - - - ResXFileCodeGenerator - Branches.Designer.cs - - - ResXFileCodeGenerator - AI_Prompts.Designer.cs - - - ResXFileCodeGenerator - AI_Providers.Designer.cs - - - ResXFileCodeGenerator - AI_Misc.Designer.cs - - - ResXFileCodeGenerator - Reports_Archives.Designer.cs - - - ResXFileCodeGenerator - AI_Reports.Designer.cs - - - ResXFileCodeGenerator - AI_Settings.Designer.cs - - - ResXFileCodeGenerator - AI_FineTuningDatasets.Designer.cs - - - - - - True - True - Clients.resx - - - True - True - Translations.resx - - - True - True - Storage.resx - - - True - True - SourceFiles.resx - - - True - True - Projects.resx - - - True - True - Reports.resx - - - True - True - Tasks.resx - - - True - True - Dictionaries.resx - - - True - True - Distributions.resx - - - True - True - Glossaries.resx - - - True - True - Glossaries_Terms.resx - - - True - True - Labels.resx - - - True - True - Languages.resx - - - True - True - MachineTranslationEngines.resx - - - True - True - Screenshots.resx - - - True - True - Screenshots_Tags.resx - - - True - True - StringTranslations.resx - - - True - True - StringTranslations_Votes.resx - - - True - True - Teams.resx - - - True - True - Webhooks.resx - - - True - True - Users.resx - - - True - True - Bundles.resx - - - True - True - Reports_SettingsTemplates.resx - - - True - True - Glossaries_Concepts.resx - - - True - True - Workflows.resx - - - True - True - Projects_FileFormatSettings.resx - - - True - True - Tasks_SettingsTemplates.resx - - - True - True - TranslationMemory.resx - - - True - True - TranslationMemory_Segments.resx - - - True - True - Webhooks_Organization.resx - - - True - True - SourceStrings.resx - - - True - True - Core_ErrorResponses.resx - - - True - True - Core_BugCases.resx - - - True - True - Notifications.resx - - - True - True - Projects_StringsExporterSettings.resx - - - True - True - Applications.resx - - - True - True - SecurityLogs.resx - - - True - True - Fields.resx - - - True - True - Branches.resx - - - True - True - AI_Prompts.resx - - - True - True - AI_Providers.resx - - - True - True - AI_Misc.resx - - - True - True - AI_Prompts.resx - - - True - True - AI_Providers.resx - - - True - True - AI_Misc.resx - - - True - True - Branches.resx - - - True - True - Reports_Archives.resx - - - True - True - AI_Reports.resx - - - True - True - AI_Settings.resx - - - True - True - AI_FineTuningDatasets.resx - - - - diff --git a/tests/Crowdin.Api.UnitTesting/Crowdin.Api.UnitTesting.csproj b/tests/Crowdin.Api.UnitTesting/Crowdin.Api.UnitTesting.csproj new file mode 100644 index 00000000..2cc1e0cb --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Crowdin.Api.UnitTesting.csproj @@ -0,0 +1,36 @@ + + + + net6.0 + enable + false + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + 0618 + + + diff --git a/tests/Crowdin.Api.UnitTesting/Resources/AI_FineTuningDatasets.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_FineTuningDatasets.Designer.cs new file mode 100644 index 00000000..b07b0db6 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_FineTuningDatasets.Designer.cs @@ -0,0 +1,182 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AI_FineTuningDatasets { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AI_FineTuningDatasets() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_FineTuningDatasets", typeof(AI_FineTuningDatasets).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "projectIds": [ + /// 1, 2, 3 + /// ], + /// "purpose": "validation", + /// "dateFrom": "2019-09-23T11:26:54+00:00", + /// "dateTo": "2019-09-23T11:26:54+00:00", + /// "maxFileSize": 100, + /// "minExamplesCount": 10, + /// "maxExamplesCount": 50 + /// }, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// [rest of string was truncated]";. + /// + internal static string CommonResponses_AiFineTuningDataset { + get { + return ResourceManager.GetString("CommonResponses_AiFineTuningDataset", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "dryRun": true, + /// "hyperparameters": { + /// "batchSize": 2, + /// "learningRateMultiplier": 0.2, + /// "nEpochs": 200 + /// }, + /// "trainingOptions": { + /// "projectIds": [ + /// 1, 2, 3 + /// ], + /// "dateFrom": "2019-09-23T11:26:54+00:00", + /// "dateTo": "2019-09-23T11:26:54+00:00", + /// "maxFileSize": 100, + /// [rest of string was truncated]";. + /// + internal static string CommonResponses_AiFineTuningJob { + get { + return ResourceManager.GetString("CommonResponses_AiFineTuningJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "url": "https://test.com", + /// "expireIn": "2019-09-20T10:31:21+00:00" + /// } + ///}. + /// + internal static string CommonResponses_DownloadLink { + get { + return ResourceManager.GetString("CommonResponses_DownloadLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "dryRun": true, + /// "hyperparameters": { + /// "batchSize": 2, + /// "learningRateMultiplier": 0.2, + /// "nEpochs": 200 + /// }, + /// "trainingOptions": { + /// "projectIds": [ + /// 1, 2, 3 + /// ], + /// "dateFrom": "2019-09-23T11:26:54+00:00", + /// "dateTo": "2019-09-23T11:26:54+00:00", + /// "maxFileSize": 100, + /// "minExamplesCount": 10, + /// "maxExamplesCount": 50 + /// }, + /// "validationOptions": { + /// "projectIds": [ + /// 1, 2, 3 + /// ], + /// "dateFrom": "2019-09-23T11:26:54+00:00", + /// "dateTo": "2019-0 [rest of string was truncated]";. + /// + internal static string CreateAiPromptFineTuningJob_Request { + get { + return ResourceManager.GetString("CreateAiPromptFineTuningJob_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "projectIds": [ + /// 1, 2, 3 + /// ], + /// "purpose": "training", + /// "dateFrom": "2019-09-23T11:26:54+00:00", + /// "dateTo": "2019-09-23T11:26:54+00:00", + /// "maxFileSize": 100, + /// "minExamplesCount": 10, + /// "maxExamplesCount": 50 + ///}. + /// + internal static string GenerateAiPromptFineTuningDataset_Request { + get { + return ResourceManager.GetString("GenerateAiPromptFineTuningDataset_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_FineTuningDatasets.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_FineTuningDatasets.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_FineTuningDatasets.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_FineTuningDatasets.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Misc.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_Misc.Designer.cs similarity index 91% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Misc.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Misc.Designer.cs index 37092aa4..d02ffaf9 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_Misc.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_Misc.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class AI_Misc { @@ -38,7 +39,7 @@ internal AI_Misc() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_Misc", typeof(AI_Misc).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_Misc", typeof(AI_Misc).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Misc.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_Misc.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Misc.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Misc.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/AI_Prompts.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_Prompts.Designer.cs new file mode 100644 index 00000000..9497a7a4 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_Prompts.Designer.cs @@ -0,0 +1,243 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AI_Prompts { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AI_Prompts() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_Prompts", typeof(AI_Prompts).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "Pre-translate prompt", + /// "action": "pre_translate", + /// "aiProviderId": 1, + /// "aiModelId": "gpt-3.5-turbo-instruct", + /// "config": { + /// "mode": "basic", + /// "companyDescription": "string", + /// "projectDescription": "string", + /// "audienceDescription": "string", + /// "otherLanguageTranslations": { + /// "isEnabled": true, + /// "languageIds": [ + /// "uk" + /// ] + /// }, + /// "glossaryTerms": true, + /// "tmSuggestions": true, + /// "fileContent": true, + /// "fileContext": true, + /// "p [rest of string was truncated]";. + /// + internal static string AddAiPrompt_Request { + get { + return ResourceManager.GetString("AddAiPrompt_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "aiPromptId": 38 + /// }, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// "startedAt": "2019-09-23T11:26:54+00:00", + /// "finishedAt": "2019-09-23T11:26:54+00:00", + /// "eta": "1 second" + /// } + ///}. + /// + internal static string CommonResponses_AiPromptCompletion { + get { + return ResourceManager.GetString("CommonResponses_AiPromptCompletion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [{ + /// "id": 2, + /// "name": "Pre-translate prompt", + /// "action": "pre_translate", + /// "aiProviderId": 2, + /// "aiModelId": "gpt-3.5-turbo-instruct", + /// "isEnabled": true, + /// "enabledProjectIds": [ + /// 1 + /// ], + /// "config": { + /// "mode": "basic", + /// "companyDescription": "string", + /// "projectDescription": "string", + /// "audienceDescription": "string", + /// "otherLanguageTranslations": { + /// "isEnabled": true, + /// "languageIds": [ + /// "uk" + /// [rest of string was truncated]";. + /// + internal static string CommonResponses_Multi { + get { + return ResourceManager.GetString("CommonResponses_Multi", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 2, + /// "name": "Pre-translate prompt", + /// "action": "pre_translate", + /// "aiProviderId": 2, + /// "aiModelId": "gpt-3.5-turbo-instruct", + /// "isEnabled": true, + /// "enabledProjectIds": [ + /// 1 + /// ], + /// "config": { + /// "mode": "basic", + /// "companyDescription": "string", + /// "projectDescription": "string", + /// "audienceDescription": "string", + /// "otherLanguageTranslations": { + /// "isEnabled": true, + /// "languageIds": [ + /// "uk" + /// ] [rest of string was truncated]";. + /// + internal static string CommonResponses_Single { + get { + return ResourceManager.GetString("CommonResponses_Single", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "url": "https://test.com", + /// "expireIn": "2019-09-20T10:31:21+00:00" + /// } + ///}. + /// + internal static string DownloadAiPromptCompletion_Response { + get { + return ResourceManager.GetString("DownloadAiPromptCompletion_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// + /// "path": "/name", + /// "op": "replace", + /// + /// "value": "new name" + /// }, + /// + /// { + /// + /// "path": "/aiProviderId", + /// + /// "op": "replace", + /// + /// "value": 1 + /// + /// } + ///]. + /// + internal static string EditAiPrompt_Request { + get { + return ResourceManager.GetString("EditAiPrompt_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "resources": { + /// "projectId": 1, + /// "targetLanguageId": "uk", + /// "stringIds": [ + /// 1, 2, 3 + /// ] + /// }, + /// "tools": [ + /// { + /// "tool": { + /// "type": "function", + /// "function": { + /// "name": "func", + /// "description": "func desc" + /// } + /// } + /// } + /// ], + /// "tool_choice": "string" + ///}. + /// + internal static string GenerateAiPromptCompletion_Request { + get { + return ResourceManager.GetString("GenerateAiPromptCompletion_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Prompts.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_Prompts.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Prompts.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Prompts.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Providers.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_Providers.Designer.cs similarity index 97% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Providers.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Providers.Designer.cs index 587a4f7a..ff380057 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/AI_Providers.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_Providers.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class AI_Providers { @@ -38,7 +39,7 @@ internal AI_Providers() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.AI_Providers", typeof(AI_Providers).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_Providers", typeof(AI_Providers).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Providers.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_Providers.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Providers.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Providers.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/AI_Reports.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_Reports.Designer.cs new file mode 100644 index 00000000..5754f6b8 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_Reports.Designer.cs @@ -0,0 +1,127 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AI_Reports { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AI_Reports() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_Reports", typeof(AI_Reports).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "format": "json", + /// "reportType": "tokens-usage-raw-data", + /// "schema": {} + /// }, + /// "createdAt": "2024-01-23T11:26:54+00:00", + /// "updatedAt": "2024-01-23T11:26:54+00:00", + /// "startedAt": "2024-01-23T11:26:54+00:00", + /// "finishedAt": "2024-01-23T11:26:54+00:00", + /// "eta": "1 second" + /// } + ///}. + /// + internal static string CommonResponses_AiReportGenerationStatus { + get { + return ResourceManager.GetString("CommonResponses_AiReportGenerationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "url": "https://test.com", + /// "expireIn": "2019-09-20T10:31:21+00:00" + /// } + ///}. + /// + internal static string DownloadAiReport_Response { + get { + return ResourceManager.GetString("DownloadAiReport_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "type": "tokens-usage-raw-data", + /// "schema": { + /// "dateFrom": "2024-01-23T07:00:14+00:00", + /// "dateTo": "2024-09-27T07:00:14+00:00", + /// "format": "json", + /// "projectIds": [ + /// 22 + /// ], + /// "promptIds": [ + /// 18 + /// ], + /// "userIds": [ + /// 1 + /// ] + /// } + ///}. + /// + internal static string GenerateAiReport_Request { + get { + return ResourceManager.GetString("GenerateAiReport_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Reports.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_Reports.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Reports.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Reports.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/AI_Settings.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/AI_Settings.Designer.cs new file mode 100644 index 00000000..2305c45f --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/AI_Settings.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AI_Settings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AI_Settings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.AI_Settings", typeof(AI_Settings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "assistActionAiPromptId": 2, + /// "showSuggestion": true, + /// "shortcuts": [ + /// { + /// "name": "My first shortcut", + /// "prompt": "Make translation shorter", + /// "enabled": true + /// } + /// ] + /// } + ///}. + /// + internal static string CommonResponses_AiSettings { + get { + return ResourceManager.GetString("CommonResponses_AiSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// "path": "/assistActionAiPromptId", + /// "op": "replace", + /// "value": true + /// } + ///]. + /// + internal static string EditAiSettings_Request { + get { + return ResourceManager.GetString("EditAiSettings_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/AI_Settings.resx b/tests/Crowdin.Api.UnitTesting/Resources/AI_Settings.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/AI_Settings.resx rename to tests/Crowdin.Api.UnitTesting/Resources/AI_Settings.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Applications.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Applications.Designer.cs similarity index 97% rename from tests/Crowdin.Api.Tests/Core/Resources/Applications.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Applications.Designer.cs index a5d9bad5..2e4cb8f2 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Applications.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Applications.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal Applications() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Applications", typeof(Applications).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Applications", typeof(Applications).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Applications.resx b/tests/Crowdin.Api.UnitTesting/Resources/Applications.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Applications.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Applications.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Branches.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Branches.Designer.cs new file mode 100644 index 00000000..84f91a01 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Branches.Designer.cs @@ -0,0 +1,229 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Branches { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Branches() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Branches", typeof(Branches).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "develop-master", + /// "title": "Master branch" + ///}. + /// + internal static string Request_AddBranch { + get { + return ResourceManager.GetString("Request_AddBranch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "develop-master", + /// "title": "Master branch" + ///}. + /// + internal static string Request_CloneBranch { + get { + return ResourceManager.GetString("Request_CloneBranch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// "path": "/name", + /// "op": "replace", + /// "value": "develop-master" + /// }, + /// { + /// "path": "/title", + /// "op": "replace", + /// "value": "Master branch" + /// } + ///]. + /// + internal static string Request_EditBranch { + get { + return ResourceManager.GetString("Request_EditBranch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "deleteAfterMerge": true, + /// "sourceBranchId": 8, + /// "dryRun": true + ///}. + /// + internal static string Request_MergeBranch { + get { + return ResourceManager.GetString("Request_MergeBranch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": {}, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// "startedAt": "2019-09-23T11:26:54+00:00", + /// "finishedAt": "2019-09-23T11:26:54+00:00" + /// } + ///}. + /// + internal static string Response_BranchCloneStatus { + get { + return ResourceManager.GetString("Response_BranchCloneStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "sourceBranchId": 38, + /// "deleteAfterMerge": false + /// }, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// "startedAt": "2019-09-23T11:26:54+00:00", + /// "finishedAt": "2019-09-23T11:26:54+00:00" + /// } + ///}. + /// + internal static string Response_BranchMergeStatus { + get { + return ResourceManager.GetString("Response_BranchMergeStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "status": "merged", + /// "sourceBranchId": 100, + /// "targetBranchId": 100, + /// "dryRun": false, + /// "details": { + /// "added": 1, + /// "deleted": 2, + /// "updated": 3, + /// "conflicted": 7 + /// } + /// } + ///}. + /// + internal static string Response_BranchMergeSummary { + get { + return ResourceManager.GetString("Response_BranchMergeSummary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 34, + /// "projectId": 2, + /// "name": "develop-master", + /// "title": "Master branch", + /// "createdAt": "2019-09-16T13:48:04+00:00", + /// "updatedAt": "2019-09-19T13:25:27+00:00" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + ///}. + /// + internal static string Response_Common_Multi { + get { + return ResourceManager.GetString("Response_Common_Multi", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 34, + /// "projectId": 2, + /// "name": "develop-master", + /// "title": "Master branch", + /// "createdAt": "2019-09-16T13:48:04+00:00", + /// "updatedAt": "2019-09-19T13:25:27+00:00" + /// } + ///}. + /// + internal static string Response_Common_Single { + get { + return ResourceManager.GetString("Response_Common_Single", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Branches.resx b/tests/Crowdin.Api.UnitTesting/Resources/Branches.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Branches.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Branches.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Bundles.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Bundles.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Bundles.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Bundles.Designer.cs index a5b9a4d3..4c7a4c3f 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Bundles.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Bundles.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal Bundles() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Bundles", typeof(Bundles).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Bundles", typeof(Bundles).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Bundles.resx b/tests/Crowdin.Api.UnitTesting/Resources/Bundles.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Bundles.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Bundles.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Clients.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Clients.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Clients.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Clients.Designer.cs index b7e534ac..13d64efc 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Clients.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Clients.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal Clients() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Clients", typeof(Clients).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Clients", typeof(Clients).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Clients.resx b/tests/Crowdin.Api.UnitTesting/Resources/Clients.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Clients.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Clients.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Core_BugCases.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Core_BugCases.Designer.cs new file mode 100644 index 00000000..92b44e2b --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Core_BugCases.Designer.cs @@ -0,0 +1,115 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Core_BugCases { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Core_BugCases() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Core_BugCases", typeof(Core_BugCases).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 4, + /// "name": "Proofread", + /// "url": "https://webhook.site/1c20d9b5-6e6a-4522-974d-9da7ea7595c9", + /// "events": [ + /// "project.created" + /// ], + /// "headers": [], + /// "payload": { + /// "project.created": { + /// "event": "{{event}}", + /// "project": { + /// "id": "{{projectId}}", + /// "userId": "{{projectUserId}}", + /// "sourceLanguageId": "{{projectSourceLanguageId}}", + /// "targetLanguageIds": "{{projectTargetLanguageIds}}", + /// "i [rest of string was truncated]";. + /// + internal static string Response_OrgWebhook_HeadersArray { + get { + return ResourceManager.GetString("Response_OrgWebhook_HeadersArray", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 8, + /// "type": 0, + /// "userId": 6, + /// "sourceLanguageId": "en", + /// "targetLanguageIds": [ + /// "es" + /// ], + /// "languageAccessPolicy": "moderate", + /// "name": "Knowledge Base", + /// "cname": "my-custom-domain.crowdin.com", + /// "identifier": "1f198a4e907688bc65834a6d5a6000c3", + /// "description": "Vault of all terms and their explanation", + /// "visibility": "private", + /// "logo": "data:image/png;", + /// "publicDownloads": true, + /// "createdAt": "2019-09-20T11:34:40+00 [rest of string was truncated]";. + /// + internal static string Response_ProjectSettings_TmPenalties { + get { + return ResourceManager.GetString("Response_ProjectSettings_TmPenalties", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Core_BugCases.resx b/tests/Crowdin.Api.UnitTesting/Resources/Core_BugCases.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Core_BugCases.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Core_BugCases.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Core_ErrorResponses.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Core_ErrorResponses.Designer.cs similarity index 90% rename from tests/Crowdin.Api.Tests/Core/Resources/Core_ErrorResponses.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Core_ErrorResponses.Designer.cs index 3c3d0943..7ff771b1 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Core_ErrorResponses.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Core_ErrorResponses.Designer.cs @@ -1,13 +1,14 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Core_ErrorResponses { @@ -38,7 +39,7 @@ internal Core_ErrorResponses() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Core_ErrorResponses", typeof(Core_ErrorResponses).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Core_ErrorResponses", typeof(Core_ErrorResponses).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Core_ErrorResponses.resx b/tests/Crowdin.Api.UnitTesting/Resources/Core_ErrorResponses.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Core_ErrorResponses.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Core_ErrorResponses.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Dictionaries.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Dictionaries.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Dictionaries.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Dictionaries.Designer.cs index 12cca88d..7be4fa5e 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Dictionaries.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Dictionaries.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -19,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Dictionaries { @@ -39,7 +39,7 @@ internal Dictionaries() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Dictionaries", typeof(Dictionaries).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Dictionaries", typeof(Dictionaries).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Dictionaries.resx b/tests/Crowdin.Api.UnitTesting/Resources/Dictionaries.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Dictionaries.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Dictionaries.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Distributions.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Distributions.Designer.cs similarity index 97% rename from tests/Crowdin.Api.Tests/Core/Resources/Distributions.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Distributions.Designer.cs index 755091a0..16f2fe25 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Distributions.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Distributions.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal Distributions() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Distributions", typeof(Distributions).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Distributions", typeof(Distributions).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Distributions.resx b/tests/Crowdin.Api.UnitTesting/Resources/Distributions.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Distributions.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Distributions.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Fields.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Fields.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Fields.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Fields.Designer.cs index 8b87561b..8348bbb1 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Fields.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Fields.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Fields { @@ -38,7 +39,7 @@ internal Fields() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Fields", typeof(Fields).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Fields", typeof(Fields).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Fields.resx b/tests/Crowdin.Api.UnitTesting/Resources/Fields.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Fields.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Fields.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries.Designer.cs index 303ac666..a1f9d68e 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Glossaries { @@ -38,7 +39,7 @@ internal Glossaries() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Glossaries", typeof(Glossaries).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Glossaries", typeof(Glossaries).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries.resx b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Concepts.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Concepts.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Concepts.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Concepts.Designer.cs index 16c0cfd8..6c732d30 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Concepts.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Concepts.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Glossaries_Concepts { @@ -38,7 +39,7 @@ internal Glossaries_Concepts() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Glossaries_Concepts", typeof(Glossaries_Concepts).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Glossaries_Concepts", typeof(Glossaries_Concepts).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Concepts.resx b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Concepts.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Concepts.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Concepts.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Terms.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Terms.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Terms.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Terms.Designer.cs index 2642db89..cb5eca0a 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Terms.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Terms.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -19,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Glossaries_Terms { @@ -39,7 +39,7 @@ internal Glossaries_Terms() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Glossaries_Terms", typeof(Glossaries_Terms).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Glossaries_Terms", typeof(Glossaries_Terms).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Terms.resx b/tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Terms.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Glossaries_Terms.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Glossaries_Terms.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Labels.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Labels.Designer.cs new file mode 100644 index 00000000..11912432 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Labels.Designer.cs @@ -0,0 +1,180 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Labels { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Labels() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Labels", typeof(Labels).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to {"title": "main"}. + /// + internal static string AddLabel_Request { + get { + return ResourceManager.GetString("AddLabel_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 34, + /// "title": "main" + /// } + ///}. + /// + internal static string AddLabel_Response { + get { + return ResourceManager.GetString("AddLabel_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "screenshotIds": [ + /// 1, 2, 3 + /// ] + ///}. + /// + internal static string AssignLabelToScreenshots_Request { + get { + return ResourceManager.GetString("AssignLabelToScreenshots_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "stringIds": [ + /// 1, 2, 3, 4, 5 + /// ] + ///}. + /// + internal static string AssignLabelToStrings_Request { + get { + return ResourceManager.GetString("AssignLabelToStrings_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2814, + /// "projectId": 2, + /// "fileId": 48, + /// "branchId": 12, + /// "directoryId": 13, + /// "identifier": "name", + /// "text": "Not all videos are shown to users. See more", + /// "type": "text", + /// "context": "shown on main page", + /// "maxLength": 35, + /// "isHidden": false, + /// "revision": 1, + /// "hasPlurals": false, + /// "isIcu": false, + /// "labelIds": [ + /// 3 + /// ], + /// [rest of string was truncated]";. + /// + internal static string AssignLabelToStrings_Response { + get { + return ResourceManager.GetString("AssignLabelToStrings_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2, + /// "userId": 6, + /// "url": "https://production-enterprise-screenshots.downloads.crowdin.com/992000002/6/2/middle.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20190923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190923T093016Z&X-Amz-SignedHeaders=host&X-Amz-Expires=120&X-Amz-Signature=8df06f57594f7d1804b7c037629f6916224415e9b935c4f6619fbe002fb25e73", + /// "name": "tra [rest of string was truncated]";. + /// + internal static string CommonResponses_LabelToScreenshots { + get { + return ResourceManager.GetString("CommonResponses_LabelToScreenshots", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 34, + /// "title": "main" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + ///}. + /// + internal static string ListLabels_Response { + get { + return ResourceManager.GetString("ListLabels_Response", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Labels.resx b/tests/Crowdin.Api.UnitTesting/Resources/Labels.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Labels.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Labels.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Languages.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Languages.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Languages.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Languages.Designer.cs index ab1478bd..9868f63e 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Languages.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Languages.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -19,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Languages { @@ -39,7 +39,7 @@ internal Languages() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Languages", typeof(Languages).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Languages", typeof(Languages).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Languages.resx b/tests/Crowdin.Api.UnitTesting/Resources/Languages.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Languages.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Languages.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/MachineTranslationEngines.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/MachineTranslationEngines.Designer.cs similarity index 94% rename from tests/Crowdin.Api.Tests/Core/Resources/MachineTranslationEngines.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/MachineTranslationEngines.Designer.cs index 51c45e0e..d313b124 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/MachineTranslationEngines.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/MachineTranslationEngines.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -38,7 +39,7 @@ internal MachineTranslationEngines() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.MachineTranslationEngines", typeof(MachineTranslationEngines).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.MachineTranslationEngines", typeof(MachineTranslationEngines).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/MachineTranslationEngines.resx b/tests/Crowdin.Api.UnitTesting/Resources/MachineTranslationEngines.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/MachineTranslationEngines.resx rename to tests/Crowdin.Api.UnitTesting/Resources/MachineTranslationEngines.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Notifications.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Notifications.Designer.cs similarity index 94% rename from tests/Crowdin.Api.Tests/Core/Resources/Notifications.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Notifications.Designer.cs index 61cb0608..cc8330d3 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Notifications.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Notifications.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Notifications { @@ -38,7 +39,7 @@ internal Notifications() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Notifications", typeof(Notifications).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Notifications", typeof(Notifications).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Notifications.resx b/tests/Crowdin.Api.UnitTesting/Resources/Notifications.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Notifications.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Notifications.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Projects.Designer.cs similarity index 97% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Projects.Designer.cs index a3daa5f2..730da7d9 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Projects.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Projects.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Projects { @@ -38,7 +39,7 @@ internal Projects() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Projects", typeof(Projects).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Projects", typeof(Projects).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects.resx b/tests/Crowdin.Api.UnitTesting/Resources/Projects.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Projects.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects_FileFormatSettings.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Projects_FileFormatSettings.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects_FileFormatSettings.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Projects_FileFormatSettings.Designer.cs index b448e6fa..2372de2b 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Projects_FileFormatSettings.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Projects_FileFormatSettings.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Projects_FileFormatSettings { @@ -38,7 +39,7 @@ internal Projects_FileFormatSettings() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Projects_FileFormatSettings", typeof(Projects_FileFormatSettings).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Projects_FileFormatSettings", typeof(Projects_FileFormatSettings).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects_FileFormatSettings.resx b/tests/Crowdin.Api.UnitTesting/Resources/Projects_FileFormatSettings.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects_FileFormatSettings.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Projects_FileFormatSettings.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects_StringsExporterSettings.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Projects_StringsExporterSettings.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects_StringsExporterSettings.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Projects_StringsExporterSettings.Designer.cs index f48de6b5..b249738b 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Projects_StringsExporterSettings.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Projects_StringsExporterSettings.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Projects_StringsExporterSettings { @@ -38,7 +39,7 @@ internal Projects_StringsExporterSettings() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Projects_StringsExporterSettings", typeof(Projects_StringsExporterSettings).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Projects_StringsExporterSettings", typeof(Projects_StringsExporterSettings).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Projects_StringsExporterSettings.resx b/tests/Crowdin.Api.UnitTesting/Resources/Projects_StringsExporterSettings.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Projects_StringsExporterSettings.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Projects_StringsExporterSettings.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Reports.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Reports.Designer.cs new file mode 100644 index 00000000..7019e524 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Reports.Designer.cs @@ -0,0 +1,311 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Reports { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Reports() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Reports", typeof(Reports).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "format": "xlsx", + /// "reportName": "costs-estimation", + /// "schema": {} + /// }, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// "startedAt": "2019-09-23T11:26:54+00:00", + /// "finishedAt": "2019-09-23T11:26:54+00:00" + /// } + ///}. + /// + internal static string CommonResponses_ReportStatus { + get { + return ResourceManager.GetString("CommonResponses_ReportStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "costs-estimation-pe", + /// "schema": { + /// "baseRates": { + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// }, + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk", "es" + /// ], + /// "userIds": [ + /// 1, 2, 3 + /// ], + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// } + /// ], + /// "netRateSchemes": { + /// "tmMatch": [ + /// { + /// "matchType": "100", + /// "price": [rest of string was truncated]";. + /// + internal static string CostEstimationPostEditing_ByTaskSchema_Request { + get { + return ResourceManager.GetString("CostEstimationPostEditing_ByTaskSchema_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "costs-estimation-pe", + /// "schema": { + /// "baseRates": { + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// }, + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk", "es" + /// ], + /// "userIds": [ + /// 1, 2, 3 + /// ], + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// } + /// ], + /// "netRateSchemes": { + /// "tmMatch": [ + /// { + /// "matchType": "100", + /// "price": [rest of string was truncated]";. + /// + internal static string CostEstimationPostEditing_GeneralSchema_Request { + get { + return ResourceManager.GetString("CostEstimationPostEditing_GeneralSchema_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"name":"costs-estimation","schema":{"mode":"simple","currency":"UAH"}}. + /// + internal static string GenerateReport_Request { + get { + return ResourceManager.GetString("GenerateReport_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "group-translation-costs-pe", + /// "schema": { + /// "projectIds": [ + /// 13 + /// ], + /// "unit": "words", + /// "currency": "USD", + /// "format": "xlsx", + /// "baseRates": { + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// }, + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk" + /// ], + /// "userIds": [ + /// 1 + /// ], + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// } + /// ], + /// "netRateSchemes": { + /// "tmMatch": [ + /// [rest of string was truncated]";. + /// + internal static string Group_TranslationCostsPostEditing_GeneralSchema_Request { + get { + return ResourceManager.GetString("Group_TranslationCostsPostEditing_GeneralSchema_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "pre-translate-efficiency", + /// "schema": { + /// "taskId": 1, + /// "unit": "strings", + /// "format": "xlsx", + /// "postEditingCategories": [ + /// "0-10" + /// ] + /// } + ///}. + /// + internal static string PreTranslateEfficiency_ByTask_Request { + get { + return ResourceManager.GetString("PreTranslateEfficiency_ByTask_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "pre-translate-efficiency", + /// "schema": { + /// "languageId": "ach", + /// "dateFrom": "2019-09-23T07:00:14+00:00", + /// "dateTo": "2019-09-27T07:00:14+00:00", + /// "unit": "strings", + /// "format": "xlsx", + /// "postEditingCategories": [ + /// "0-10" + /// ] + /// } + ///}. + /// + internal static string PreTranslateEfficiency_General_Request { + get { + return ResourceManager.GetString("PreTranslateEfficiency_General_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "translation-costs-pe", + /// "schema": { + /// + /// "taskId": 1, + /// "unit": "words", + /// "currency": "USD", + /// "format": "xlsx", + /// "baseRates": { + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// }, + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk" + /// ], + /// "userIds": [ + /// 1 + /// ], + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// } + /// ], + /// "netRateSchemes": { + /// "tmMatch": [ + /// { + /// "matchT [rest of string was truncated]";. + /// + internal static string TranslationCostsPostEditing_ByTaskSchema_Request { + get { + return ResourceManager.GetString("TranslationCostsPostEditing_ByTaskSchema_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "name": "translation-costs-pe", + /// "schema": { + /// + /// "groupBy": "user", + /// "languageId": "ach", + /// "userIds": [ + /// 13 + /// ], + /// "fileIds": [ + /// 138 + /// ], + /// "directoryIds": [ + /// 11 + /// ], + /// "branchIds": [ + /// 18 + /// ], + /// "unit": "words", + /// "currency": "USD", + /// "format": "xlsx", + /// "baseRates": { + /// "fullTranslation": 0.1, + /// "proofread": 0.12 + /// }, + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk" + /// ], + /// "userI [rest of string was truncated]";. + /// + internal static string TranslationCostsPostEditing_GeneralSchema_Request { + get { + return ResourceManager.GetString("TranslationCostsPostEditing_GeneralSchema_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports.resx b/tests/Crowdin.Api.UnitTesting/Resources/Reports.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Reports.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Reports.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Reports_Archives.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Reports_Archives.Designer.cs new file mode 100644 index 00000000..b3e23fff --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Reports_Archives.Designer.cs @@ -0,0 +1,160 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Reports_Archives { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Reports_Archives() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Reports_Archives", typeof(Reports_Archives).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "format": "json" + ///}. + /// + internal static string Request_ExportReportArchive { + get { + return ResourceManager.GetString("Request_ExportReportArchive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 12, + /// "scopeType": "project", + /// "scopeId": 35, + /// "userId": 35, + /// "name": "string", + /// "webUrl": "https://crowdin.com", + /// "scheme": {}, + /// "createdAt": "2019-09-23T11:26:54+00:00" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + ///}. + /// + internal static string Response_Common_Multi { + get { + return ResourceManager.GetString("Response_Common_Multi", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 12, + /// "scopeType": "project", + /// "scopeId": 35, + /// "userId": 35, + /// "name": "string", + /// "webUrl": "https://crowdin.com/project/project-identifier/reports/archive/1", + /// "scheme": {}, + /// "createdAt": "2019-09-23T11:26:54+00:00" + /// } + ///}. + /// + internal static string Response_Common_Single { + get { + return ResourceManager.GetString("Response_Common_Single", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "url": "https://crowdin.com", + /// "expireIn": "2019-09-20T10:31:21+00:00" + /// } + ///}. + /// + internal static string Response_DownloadLink { + get { + return ResourceManager.GetString("Response_DownloadLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "format": "xlsx", + /// "reportName": "costs-estimation", + /// "schema": {} + /// }, + /// "createdAt": "2019-09-23T11:26:54+00:00", + /// "updatedAt": "2019-09-23T11:26:54+00:00", + /// "startedAt": "2019-09-23T11:26:54+00:00", + /// "finishedAt": "2019-09-23T11:26:54+00:00" + /// } + ///}. + /// + internal static string Response_GroupReportStatus { + get { + return ResourceManager.GetString("Response_GroupReportStatus", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports_Archives.resx b/tests/Crowdin.Api.UnitTesting/Resources/Reports_Archives.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Reports_Archives.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Reports_Archives.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports_SettingsTemplates.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Reports_SettingsTemplates.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Reports_SettingsTemplates.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Reports_SettingsTemplates.Designer.cs index 282c190d..ab6c55da 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Reports_SettingsTemplates.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Reports_SettingsTemplates.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal Reports_SettingsTemplates() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Reports_SettingsTemplates", typeof(Reports_SettingsTemplates).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Reports_SettingsTemplates", typeof(Reports_SettingsTemplates).Assembly); resourceMan = temp; } return resourceMan; @@ -61,36 +61,36 @@ internal Reports_SettingsTemplates() { } /// - /// Looks up a localized string similar to { - /// "mode": "fuzzy", - /// "config": { - /// "regularRates": [ - /// { - /// "mode": "94-90", - /// "value": 0.1 - /// } - /// ], - /// "individualRates": [ - /// { - /// "languageIds": [ - /// "uk" - /// ], - /// "userIds": [ - /// 1 - /// ], - /// "rates": [ - /// { - /// "mode": "94-90", - /// "value": 0.1 - /// } - /// ] - /// } - /// ] - /// }, - /// "name": "Default template", - /// "currency": "USD", - /// "unit": "words", - /// "isPublic": false + /// Looks up a localized string similar to { + /// "mode": "fuzzy", + /// "config": { + /// "regularRates": [ + /// { + /// "mode": "94-90", + /// "value": 0.1 + /// } + /// ], + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk" + /// ], + /// "userIds": [ + /// 1 + /// ], + /// "rates": [ + /// { + /// "mode": "94-90", + /// "value": 0.1 + /// } + /// ] + /// } + /// ] + /// }, + /// "name": "Default template", + /// "currency": "USD", + /// "unit": "words", + /// "isPublic": false ///}. /// internal static string AddReportSettingsTemplate_Fuzzy_Request { @@ -135,36 +135,36 @@ internal static string AddReportSettingsTemplate_Fuzzy_Response { } /// - /// Looks up a localized string similar to { - /// "mode": "simple", - /// "config": { - /// "regularRates": [ - /// { - /// "mode": "tm_match", - /// "value": 0.1 - /// } - /// ], - /// "individualRates": [ - /// { - /// "languageIds": [ - /// "uk" - /// ], - /// "userIds": [ - /// 1 - /// ], - /// "rates": [ - /// { - /// "mode": "tm_match", - /// "value": 0.1 - /// } - /// ] - /// } - /// ] - /// }, - /// "name": "Default template", - /// "currency": "USD", - /// "unit": "words", - /// "isPublic": false + /// Looks up a localized string similar to { + /// "mode": "simple", + /// "config": { + /// "regularRates": [ + /// { + /// "mode": "tm_match", + /// "value": 0.1 + /// } + /// ], + /// "individualRates": [ + /// { + /// "languageIds": [ + /// "uk" + /// ], + /// "userIds": [ + /// 1 + /// ], + /// "rates": [ + /// { + /// "mode": "tm_match", + /// "value": 0.1 + /// } + /// ] + /// } + /// ] + /// }, + /// "name": "Default template", + /// "currency": "USD", + /// "unit": "words", + /// "isPublic": false ///}. /// internal static string AddReportSettingsTemplate_Simple_Request { diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Reports_SettingsTemplates.resx b/tests/Crowdin.Api.UnitTesting/Resources/Reports_SettingsTemplates.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Reports_SettingsTemplates.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Reports_SettingsTemplates.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Screenshots.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots.Designer.cs new file mode 100644 index 00000000..799930a1 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots.Designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Screenshots { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Screenshots() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Screenshots", typeof(Screenshots).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "storageId": 71, + /// "name": "translate_with_siri.jpg", + /// "autoTag": true, + /// "labelIds": [ + /// 0, 1 + /// ] + ///}. + /// + internal static string AddScreenshot_Request { + get { + return ResourceManager.GetString("AddScreenshot_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 2, + /// "userId": 6, + /// "url": "https://production-enterprise-screenshots.downloads.crowdin.com/992000002/6/2/middle.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20190923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190923T093016Z&X-Amz-SignedHeaders=host&X-Amz-Expires=120&X-Amz-Signature=8df06f57594f7d1804b7c037629f6916224415e9b935c4f6619fbe002fb25e73", + /// "name": "translate_with_siri.jpg", + /// "size": { + /// [rest of string was truncated]";. + /// + internal static string AddScreenshot_Response { + get { + return ResourceManager.GetString("AddScreenshot_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 2, + /// "userId": 6, + /// "url": "https://production-enterprise-screenshots.downloads.crowdin.com/992000002/6/2/middle.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20190923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190923T093016Z&X-Amz-SignedHeaders=host&X-Amz-Expires=120&X-Amz-Signature=8df06f57594f7d1804b7c037629f6916224415e9b935c4f6619fbe002fb25e73", + /// "name": "tra [rest of string was truncated]";. + /// + internal static string EditScreenshot_Response { + get { + return ResourceManager.GetString("EditScreenshot_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 2, + /// "userId": 6, + /// "url": "https://production-enterprise-screenshots.downloads.crowdin.com/992000002/6/2/middle.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20190923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190923T093016Z&X-Amz-SignedHeaders=host&X-Amz-Expires=120&X-Amz-Signature=8df06f57594f7d1804b7c037629f6916224415e9b935c4f6619fbe002fb25e73", + /// "name": "translate_with_siri.jpg", + /// "size": { + /// [rest of string was truncated]";. + /// + internal static string GetScreenshot_Response { + get { + return ResourceManager.GetString("GetScreenshot_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2, + /// "userId": 6, + /// "url": "https://production-enterprise-screenshots.downloads.crowdin.com/992000002/6/2/middle.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20190923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190923T093016Z&X-Amz-SignedHeaders=host&X-Amz-Expires=120&X-Amz-Signature=8df06f57594f7d1804b7c037629f6916224415e9b935c4f6619fbe002fb25e73", + /// "webUrl": "h [rest of string was truncated]";. + /// + internal static string ListScreenshots_Response { + get { + return ResourceManager.GetString("ListScreenshots_Response", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots.resx b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Screenshots.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Screenshots.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots_Tags.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots_Tags.Designer.cs similarity index 94% rename from tests/Crowdin.Api.Tests/Core/Resources/Screenshots_Tags.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Screenshots_Tags.Designer.cs index caca9683..a8c43bad 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots_Tags.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots_Tags.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Screenshots_Tags { @@ -38,7 +39,7 @@ internal Screenshots_Tags() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Screenshots_Tags", typeof(Screenshots_Tags).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Screenshots_Tags", typeof(Screenshots_Tags).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Screenshots_Tags.resx b/tests/Crowdin.Api.UnitTesting/Resources/Screenshots_Tags.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Screenshots_Tags.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Screenshots_Tags.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/SecurityLogs.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/SecurityLogs.Designer.cs new file mode 100644 index 00000000..bf5accf3 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/SecurityLogs.Designer.cs @@ -0,0 +1,111 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SecurityLogs { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal SecurityLogs() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.SecurityLogs", typeof(SecurityLogs).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "id": 2, + /// "event": "application.connected", + /// "info": "Some info", + /// "userId": 4, + /// "location": "USA", + /// "ipAddress": "127.0.0.1", + /// "deviceName": "MacOs on MacBook", + /// "createdAt": "2019-09-19T15:10:43+00:00" + /// } + ///}. + /// + internal static string GetUserSecurityLog_Response { + get { + return ResourceManager.GetString("GetUserSecurityLog_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2, + /// "event": "application.connected", + /// "info": "Some info", + /// "userId": 4, + /// "location": "USA", + /// "ipAddress": "127.0.0.1", + /// "deviceName": "MacOs on MacBook", + /// "createdAt": "2019-09-19T15:10:43+00:00" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + ///}. + /// + internal static string ListUserSecurityLogs_Response { + get { + return ResourceManager.GetString("ListUserSecurityLogs_Response", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SecurityLogs.resx b/tests/Crowdin.Api.UnitTesting/Resources/SecurityLogs.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/SecurityLogs.resx rename to tests/Crowdin.Api.UnitTesting/Resources/SecurityLogs.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SourceFiles.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.Designer.cs similarity index 98% rename from tests/Crowdin.Api.Tests/Core/Resources/SourceFiles.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.Designer.cs index 80960b99..140b8629 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/SourceFiles.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -39,7 +39,7 @@ internal SourceFiles() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.SourceFiles", typeof(SourceFiles).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.SourceFiles", typeof(SourceFiles).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SourceFiles.resx b/tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/SourceFiles.resx rename to tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/SourceStrings.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/SourceStrings.Designer.cs new file mode 100644 index 00000000..9cfc79a1 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/SourceStrings.Designer.cs @@ -0,0 +1,243 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SourceStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal SourceStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.SourceStrings", typeof(SourceStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2814, + /// "projectId": 2, + /// "fileId": 48, + /// "branchId": 12, + /// "directoryId": 13, + /// "identifier": "name", + /// "text": "Not all videos are shown to users. See more", + /// "type": "text", + /// "context": "shown on main page", + /// "maxLength": 35, + /// "isHidden": false, + /// "isDuplicate": true, + /// "masterStringId": 1, + /// "revision": 1, + /// "hasPlurals": false, + /// "isIcu": fal [rest of string was truncated]";. + /// + internal static string CommonResponses_SingleStringInArray { + get { + return ResourceManager.GetString("CommonResponses_SingleStringInArray", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3", + /// "status": "finished", + /// "progress": 100, + /// "attributes": { + /// "branchId": 38, + /// "storageId": 38, + /// "fileType": "android", + /// "parserVersion": 8, + /// "labelIds": [ + /// 1, + /// 2 + /// ], + /// "importOptions": { + /// "firstLineContainsHeader": false, + /// "importTranslations": true, + /// "scheme": { + /// "identifier": 0, + /// "sourcePhrase": 1, + /// "en": 2, + /// [rest of string was truncated]";. + /// + internal static string CommonResponses_UploadStrings { + get { + return ResourceManager.GetString("CommonResponses_UploadStrings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// + /// "path": "/2814/isHidden", + /// "op": "replace", + /// "value": true + /// }, + /// { + /// + /// "path": "/2814/context", + /// "op": "replace", + /// "value": "some context" + /// }, + /// { + /// + /// "path": "/-", + /// "op": "add", + /// "value": { + /// "text": "new added string", + /// "identifier": "a.b.c", + /// + /// "fileId": 5, + /// "context": "context for new string", + /// "isHidden": false + /// } + /// }, + /// { + /// + /// "path": "/2815", + /// "op": "remove" + /// } + ///]. + /// + internal static string StringBatchOperations_Request { + get { + return ResourceManager.GetString("StringBatchOperations_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 2814, + /// "projectId": 2, + /// "fileId": 48, + /// "branchId": 12, + /// "directoryId": 13, + /// "identifier": "name", + /// "text": "Not all videos are shown to users. See more", + /// "type": "text", + /// "context": "shown on main page", + /// "maxLength": 35, + /// "isHidden": false, + /// "isDuplicate": true, + /// "masterStringId": 1, + /// "revision": 1, + /// "hasPlurals": false, + /// "isIcu": fal [rest of string was truncated]";. + /// + internal static string StringBatchOperations_Response { + get { + return ResourceManager.GetString("StringBatchOperations_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 468549, + /// "projectId": 11, + /// "fileId": 1533, + /// "branchId": null, + /// "directoryId": 1535, + /// "identifier": "bulk_edit_6", + /// "text": "Batch operations with send patch request", + /// "type": "text", + /// "context": "edited context using patch request", + /// "maxLength": 0, + /// "isHidden": false, + /// [rest of string was truncated]";. + /// + internal static string StringBatchOperations_Response_NoPagination { + get { + return ResourceManager.GetString("StringBatchOperations_Response_NoPagination", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "storageId": 61, + /// "branchId": 34, + /// "type": "xliff", + /// "parserVersion": 1, + /// "labelIds": [ + /// 1, 2, 3 + /// ], + /// "updateStrings": true, + /// "cleanupMode": true, + /// "importOptions": { + /// "firstLineContainsHeader": false, + /// "importTranslations": true, + /// "scheme": { + /// "identifier": 0, + /// "sourcePhrase": 1, + /// "en": 2, + /// "de": 3 + /// } + /// }, + /// "updateOption": "keep_translations_and_approvals" + ///}. + /// + internal static string UploadStrings_Request { + get { + return ResourceManager.GetString("UploadStrings_Request", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/SourceStrings.resx b/tests/Crowdin.Api.UnitTesting/Resources/SourceStrings.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/SourceStrings.resx rename to tests/Crowdin.Api.UnitTesting/Resources/SourceStrings.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Storage.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Storage.Designer.cs new file mode 100644 index 00000000..692d50c3 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Storage.Designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Storage { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Storage() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Storage", typeof(Storage).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "id": 2149231454, + /// "fileName": "umbrella_app.xliff" + /// }. + /// + internal static string AddStorageResponse { + get { + return ResourceManager.GetString("AddStorageResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 1, + /// "fileName": "umbrella_app.xliff" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + /// } + /// . + /// + internal static string ListStorages { + get { + return ResourceManager.GetString("ListStorages", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Storage.resx b/tests/Crowdin.Api.UnitTesting/Resources/Storage.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Storage.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Storage.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations.Designer.cs similarity index 97% rename from tests/Crowdin.Api.Tests/Core/Resources/StringTranslations.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/StringTranslations.Designer.cs index 349f17aa..7af0d479 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class StringTranslations { @@ -38,7 +39,7 @@ internal StringTranslations() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.StringTranslations", typeof(StringTranslations).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.StringTranslations", typeof(StringTranslations).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations.resx b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/StringTranslations.resx rename to tests/Crowdin.Api.UnitTesting/Resources/StringTranslations.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations_Votes.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations_Votes.Designer.cs similarity index 93% rename from tests/Crowdin.Api.Tests/Core/Resources/StringTranslations_Votes.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/StringTranslations_Votes.Designer.cs index 95ea5beb..93f35d5e 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations_Votes.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations_Votes.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -19,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class StringTranslations_Votes { @@ -39,7 +39,7 @@ internal StringTranslations_Votes() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.StringTranslations_Votes", typeof(StringTranslations_Votes).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.StringTranslations_Votes", typeof(StringTranslations_Votes).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/StringTranslations_Votes.resx b/tests/Crowdin.Api.UnitTesting/Resources/StringTranslations_Votes.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/StringTranslations_Votes.resx rename to tests/Crowdin.Api.UnitTesting/Resources/StringTranslations_Votes.resx diff --git a/tests/Crowdin.Api.UnitTesting/Resources/Tasks.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Tasks.Designer.cs new file mode 100644 index 00000000..43353133 --- /dev/null +++ b/tests/Crowdin.Api.UnitTesting/Resources/Tasks.Designer.cs @@ -0,0 +1,212 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Tasks { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Tasks() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Tasks", typeof(Tasks).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to {"type":2,"vendor":"gengo","tone":"Informal"}. + /// + internal static string AddTask_RightRequestJson_VendorGengo_ToneInformal { + get { + return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneInformal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"type":2,"vendor":"gengo","tone":""}. + /// + internal static string AddTask_RightRequestJson_VendorGengo_ToneNotSet { + get { + return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"type":2,"vendor":"gengo","tone":"other"}. + /// + internal static string AddTask_RightRequestJson_VendorGengo_ToneOther { + get { + return ResourceManager.GetString("AddTask_RightRequestJson_VendorGengo_ToneOther", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "title": "My task", + /// "languageId": "es", + /// "type": 2, + /// "vendor": "lingo24", + /// "status": "in_progress", + /// "description": "My amazing task", + /// + /// "fileIds": [ + /// 1,2,3 + /// ], + /// "skipAssignedStrings": true, + /// "skipUntranslatedStrings": true, + /// "labelIds": [ + /// 1 + /// ], + /// "assignees": [ + /// { + /// "id": 1, + /// "wordsCount": 20 + /// }, + /// + /// { + /// "id": 2, + /// "wordsCount": 30 + /// } + /// ] + ///}. + /// + internal static string AddTask_RightRequestJson_VendorManual { + get { + return ResourceManager.GetString("AddTask_RightRequestJson_VendorManual", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "precedingTaskId": 1, + /// "type": 1, + /// "vendor": "alconost", + /// "title": "string", + /// "description": "string", + /// "deadline": "2019-09-27T07:00:14+00:00" + ///}. + /// + internal static string Request_CrowdinLanguageServicePendingTaskCreateForm { + get { + return ResourceManager.GetString("Request_CrowdinLanguageServicePendingTaskCreateForm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "precedingTaskId": 1, + /// "type": 1, + /// "title": "string", + /// "description": "string", + /// "assignees": [ + /// { + /// "id": 1, + /// "wordsCount": 5 + /// } + /// ], + /// "assignedTeams": [ + /// { + /// "id": 1, + /// "wordsCount": 5 + /// } + /// ], + /// "deadline": "2019-09-27T07:00:14+00:00" + ///}. + /// + internal static string Request_EnterprisePendingTaskCreateForm { + get { + return ResourceManager.GetString("Request_EnterprisePendingTaskCreateForm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "precedingTaskId": 1, + /// "type": 1, + /// "title": "string", + /// "description": "string", + /// "assignees": [ + /// { + /// "id": 2, + /// "wordsCount": 3 + /// } + /// ], + /// "deadline": "2019-09-27T07:00:14+00:00" + ///}. + /// + internal static string Request_PendingTaskCreateForm { + get { + return ResourceManager.GetString("Request_PendingTaskCreateForm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "precedingTaskId": 1, + /// "type": 1, + /// "vendor": "acclaro", + /// "title": "string", + /// "description": "string", + /// "assignees": [ + /// { + /// "id": 1, + /// "wordsCount": 3 + /// } + /// ], + /// "deadline": "2019-09-27T07:00:14+00:00" + ///}. + /// + internal static string Request_VendorManualPendingTaskCreateForm { + get { + return ResourceManager.GetString("Request_VendorManualPendingTaskCreateForm", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Tasks.resx b/tests/Crowdin.Api.UnitTesting/Resources/Tasks.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Tasks.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Tasks.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Tasks_SettingsTemplates.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Tasks_SettingsTemplates.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Tasks_SettingsTemplates.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Tasks_SettingsTemplates.Designer.cs index 095a22f8..e68e4f3d 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Tasks_SettingsTemplates.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Tasks_SettingsTemplates.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Tasks_SettingsTemplates { @@ -38,7 +39,7 @@ internal Tasks_SettingsTemplates() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Tasks_SettingsTemplates", typeof(Tasks_SettingsTemplates).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Tasks_SettingsTemplates", typeof(Tasks_SettingsTemplates).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Tasks_SettingsTemplates.resx b/tests/Crowdin.Api.UnitTesting/Resources/Tasks_SettingsTemplates.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Tasks_SettingsTemplates.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Tasks_SettingsTemplates.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Teams.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Teams.Designer.cs similarity index 92% rename from tests/Crowdin.Api.Tests/Core/Resources/Teams.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Teams.Designer.cs index 9119688f..e5ce59d7 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Teams.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Teams.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Teams { @@ -38,7 +39,7 @@ internal Teams() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Teams", typeof(Teams).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Teams", typeof(Teams).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Teams.resx b/tests/Crowdin.Api.UnitTesting/Resources/Teams.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Teams.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Teams.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory.Designer.cs similarity index 98% rename from tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory.Designer.cs index 77b2e73e..b55a8e26 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class TranslationMemory { @@ -38,7 +39,7 @@ internal TranslationMemory() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.TranslationMemory", typeof(TranslationMemory).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.TranslationMemory", typeof(TranslationMemory).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory.resx b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory.resx rename to tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory_Segments.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory_Segments.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory_Segments.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory_Segments.Designer.cs index fe4ecd81..95989ae2 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory_Segments.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory_Segments.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class TranslationMemory_Segments { @@ -38,7 +39,7 @@ internal TranslationMemory_Segments() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.TranslationMemory_Segments", typeof(TranslationMemory_Segments).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.TranslationMemory_Segments", typeof(TranslationMemory_Segments).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory_Segments.resx b/tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory_Segments.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/TranslationMemory_Segments.resx rename to tests/Crowdin.Api.UnitTesting/Resources/TranslationMemory_Segments.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Translations.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Translations.Designer.cs similarity index 69% rename from tests/Crowdin.Api.Tests/Core/Resources/Translations.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Translations.Designer.cs index 1f86a202..039c702b 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Translations.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Translations.Designer.cs @@ -1,193 +1,265 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Crowdin.Api.Tests.Core.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Translations { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Translations() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Translations", typeof(Translations).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to { - /// "data": { - /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", - /// "status": "created", - /// "progress": 90, - /// "attributes": { - /// "languageIds": [ - /// "uk" - /// ], - /// "fileIds": [ - /// 0 - /// ], - /// "method": "tm", - /// "autoApproveOption": "all", - /// "duplicateTranslations": true, - /// "translateUntranslatedOnly": true, - /// "translateWithPerfectMatchOnly": true, - /// "labelIds": [2, 3], - /// "excludeLabelIds": [4] - /// }, - /// "createdAt": "2019-09 [rest of string was truncated]";. - /// - internal static string ApplyPreTranslationResponse { - get { - return ResourceManager.GetString("ApplyPreTranslationResponse", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to { - /// "data": [ - /// { - /// "data": { - /// "words": { - /// "total": 7249, - /// "translated": 3651, - /// "approved": 3637 - /// }, - /// "phrases": { - /// "total": 3041, - /// "translated": 2631, - /// "approved": 2622 - /// }, - /// "translationProgress": 86, - /// "approvalProgress": 86, - /// "fileId": 12, - /// "eTag": "fd0ea167420ef1687fd16635b9fb67a3" - /// } - /// } - /// ], - /// "pagination": { - /// "offset": 0, - /// "limit": 25 - /// } - ///}. - /// - internal static string GetLanguageStatusResponse { - get { - return ResourceManager.GetString("GetLanguageStatusResponse", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to { - /// "data": { - /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", - /// "status": "created", - /// "progress": 90, - /// "attributes": { - /// "languageIds": [ - /// "uk" - /// ], - /// "fileIds": [ - /// 0 - /// ], - /// "method": "tm", - /// "autoApproveOption": "all", - /// "duplicateTranslations": true, - /// "skipApprovedTranslations": true, - /// "translateUntranslatedOnly": true, - /// "translateWithPerfectMatchOnly": true, - /// "labelIds": [2, 3], - /// "excludeLabelIds": [4] [rest of string was truncated]";. - /// - internal static string GetPreTranslationStatus_Response { - get { - return ResourceManager.GetString("GetPreTranslationStatus_Response", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to { - /// "data": [ - /// { - /// "data": { - /// "id": 13, - /// "projectId": 12345, - /// "status": "finished", - /// "progress": 100, - /// "createdAt": "2022-03-31T18:31:28+00:00", - /// "updatedAt": "2022-03-31T18:45:15+00:00", - /// "finishedAt": "2022-03-31T18:45:15+00:00", - /// "attributes": { - /// "branchId": null, - /// "directoryId": null, - /// "targetLang [rest of string was truncated]";. - /// - internal static string ListProjectBuildsResponse { - get { - return ResourceManager.GetString("ListProjectBuildsResponse", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to { - /// "data": { - /// "projectId": 1, - /// "storageId": 34, - /// "languageId": "es", - /// "fileId": 56 - /// } - ///}. - /// - internal static string UploadTranslationsResponse { - get { - return ResourceManager.GetString("UploadTranslationsResponse", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crowdin.Api.UnitTesting.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Translations { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Translations() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Translations", typeof(Translations).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + /// "status": "created", + /// "progress": 90, + /// "attributes": { + /// "languageIds": [ + /// "uk" + /// ], + /// "fileIds": [ + /// 0 + /// ], + /// "method": "tm", + /// "autoApproveOption": "all", + /// "duplicateTranslations": true, + /// "translateUntranslatedOnly": true, + /// "translateWithPerfectMatchOnly": true, + /// "labelIds": [2, 3], + /// "excludeLabelIds": [4] + /// }, + /// "createdAt": "2019-09 [rest of string was truncated]";. + /// + internal static string ApplyPreTranslationResponse { + get { + return ResourceManager.GetString("ApplyPreTranslationResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + /// "status": "created", + /// "progress": 90, + /// "attributes": { + /// "languageIds": [ + /// "uk" + /// ], + /// "fileIds": [ + /// 742 + /// ], + /// "method": "tm", + /// "autoApproveOption": "all", + /// "duplicateTranslations": true, + /// "skipApprovedTranslations": true, + /// "translateUntranslatedOnly": true, + /// "translateWithPerfectMatchOnly": true + /// }, + /// "createdAt": "2019-09-20T14:05:50+00:00", /// [rest of string was truncated]";. + /// + internal static string CommonResources_PreTranslation { + get { + return ResourceManager.GetString("CommonResources_PreTranslation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + /// "status": "created", + /// "progress": 90, + /// "attributes": { + /// "languageIds": [ + /// "uk" + /// ], + /// "fileIds": [ + /// 742 + /// ], + /// "method": "tm", + /// "autoApproveOption": "all", + /// "duplicateTranslations": true, + /// "skipApprovedTranslations": true, + /// "translateUntranslatedOnly": true, + /// "translateWithPerfectMatchOnly": true + /// }, + /// [rest of string was truncated]";. + /// + internal static string CommonResources_PreTranslations_List { + get { + return ResourceManager.GetString("CommonResources_PreTranslations_List", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// "path": "/status", + /// "op": "replace", + /// "value": "status" + /// } + ///]. + /// + internal static string EditPreTranslation_Request { + get { + return ResourceManager.GetString("EditPreTranslation_Request", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "words": { + /// "total": 7249, + /// "translated": 3651, + /// "approved": 3637 + /// }, + /// "phrases": { + /// "total": 3041, + /// "translated": 2631, + /// "approved": 2622 + /// }, + /// "translationProgress": 86, + /// "approvalProgress": 86, + /// "fileId": 12, + /// "eTag": "fd0ea167420ef1687fd16635b9fb67a3" + /// } + /// } + /// ], + /// "pagination": { + /// "offset": 0, + /// "limit": 25 + /// } + ///}. + /// + internal static string GetLanguageStatusResponse { + get { + return ResourceManager.GetString("GetLanguageStatusResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + /// "status": "created", + /// "progress": 90, + /// "attributes": { + /// "languageIds": [ + /// "uk" + /// ], + /// "fileIds": [ + /// 0 + /// ], + /// "method": "tm", + /// "autoApproveOption": "all", + /// "duplicateTranslations": true, + /// "skipApprovedTranslations": true, + /// "translateUntranslatedOnly": true, + /// "translateWithPerfectMatchOnly": true, + /// "labelIds": [2, 3], + /// "excludeLabelIds": [4] [rest of string was truncated]";. + /// + internal static string GetPreTranslationStatus_Response { + get { + return ResourceManager.GetString("GetPreTranslationStatus_Response", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": [ + /// { + /// "data": { + /// "id": 13, + /// "projectId": 12345, + /// "status": "finished", + /// "progress": 100, + /// "createdAt": "2022-03-31T18:31:28+00:00", + /// "updatedAt": "2022-03-31T18:45:15+00:00", + /// "finishedAt": "2022-03-31T18:45:15+00:00", + /// "attributes": { + /// "branchId": null, + /// "directoryId": null, + /// "targetLang [rest of string was truncated]";. + /// + internal static string ListProjectBuildsResponse { + get { + return ResourceManager.GetString("ListProjectBuildsResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "data": { + /// "projectId": 1, + /// "storageId": 34, + /// "languageId": "es", + /// "fileId": 56 + /// } + ///}. + /// + internal static string UploadTranslationsResponse { + get { + return ResourceManager.GetString("UploadTranslationsResponse", resourceCulture); + } + } + } +} diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Translations.resx b/tests/Crowdin.Api.UnitTesting/Resources/Translations.resx similarity index 83% rename from tests/Crowdin.Api.Tests/Core/Resources/Translations.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Translations.resx index 0912aae9..f84b9640 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Translations.resx +++ b/tests/Crowdin.Api.UnitTesting/Resources/Translations.resx @@ -241,4 +241,73 @@ } } + + { + "data": [ + { + "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + "status": "created", + "progress": 90, + "attributes": { + "languageIds": [ + "uk" + ], + "fileIds": [ + 742 + ], + "method": "tm", + "autoApproveOption": "all", + "duplicateTranslations": true, + "skipApprovedTranslations": true, + "translateUntranslatedOnly": true, + "translateWithPerfectMatchOnly": true + }, + "createdAt": "2019-09-20T14:05:50+00:00", + "updatedAt": "2019-09-20T14:05:50+00:00", + "startedAt": "2019-09-20T14:05:50+00:00", + "finishedAt": "2019-09-20T14:05:50+00:00" + } + ], + "pagination": { + "offset": 0, + "limit": 25 + } +} + + + { + "data": { + "identifier": "9e7de270-4f83-41cb-b606-2f90631f26e2", + "status": "created", + "progress": 90, + "attributes": { + "languageIds": [ + "uk" + ], + "fileIds": [ + 742 + ], + "method": "tm", + "autoApproveOption": "all", + "duplicateTranslations": true, + "skipApprovedTranslations": true, + "translateUntranslatedOnly": true, + "translateWithPerfectMatchOnly": true + }, + "createdAt": "2019-09-20T14:05:50+00:00", + "updatedAt": "2019-09-20T14:05:50+00:00", + "startedAt": "2019-09-20T14:05:50+00:00", + "finishedAt": "2019-09-20T14:05:50+00:00" + } +} + + + [ + { + "path": "/status", + "op": "replace", + "value": "status" + } +] + \ No newline at end of file diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Users.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Users.Designer.cs similarity index 98% rename from tests/Crowdin.Api.Tests/Core/Resources/Users.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Users.Designer.cs index 9fe2bdc9..c8624900 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Users.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Users.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Users { @@ -38,7 +39,7 @@ internal Users() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Users", typeof(Users).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Users", typeof(Users).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Users.resx b/tests/Crowdin.Api.UnitTesting/Resources/Users.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Users.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Users.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Webhooks.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Webhooks.Designer.cs index 364fb25f..faf18bef 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -38,7 +39,7 @@ internal Webhooks() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Webhooks", typeof(Webhooks).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Webhooks", typeof(Webhooks).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks.resx b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Webhooks.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Webhooks.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks_Organization.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks_Organization.Designer.cs similarity index 95% rename from tests/Crowdin.Api.Tests/Core/Resources/Webhooks_Organization.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Webhooks_Organization.Designer.cs index 275f5729..e2f44a01 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks_Organization.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks_Organization.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Webhooks_Organization { @@ -38,7 +39,7 @@ internal Webhooks_Organization() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Webhooks_Organization", typeof(Webhooks_Organization).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Webhooks_Organization", typeof(Webhooks_Organization).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Webhooks_Organization.resx b/tests/Crowdin.Api.UnitTesting/Resources/Webhooks_Organization.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Webhooks_Organization.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Webhooks_Organization.resx diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Workflows.Designer.cs b/tests/Crowdin.Api.UnitTesting/Resources/Workflows.Designer.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/Resources/Workflows.Designer.cs rename to tests/Crowdin.Api.UnitTesting/Resources/Workflows.Designer.cs index 00a6ac75..53dc9812 100644 --- a/tests/Crowdin.Api.Tests/Core/Resources/Workflows.Designer.cs +++ b/tests/Crowdin.Api.UnitTesting/Resources/Workflows.Designer.cs @@ -1,13 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Crowdin.Api.Tests.Core.Resources { +namespace Crowdin.Api.UnitTesting.Resources { using System; @@ -18,7 +19,7 @@ namespace Crowdin.Api.Tests.Core.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Workflows { @@ -38,7 +39,7 @@ internal Workflows() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.Tests.Core.Resources.Workflows", typeof(Workflows).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crowdin.Api.UnitTesting.Resources.Workflows", typeof(Workflows).Assembly); resourceMan = temp; } return resourceMan; diff --git a/tests/Crowdin.Api.Tests/Core/Resources/Workflows.resx b/tests/Crowdin.Api.UnitTesting/Resources/Workflows.resx similarity index 100% rename from tests/Crowdin.Api.Tests/Core/Resources/Workflows.resx rename to tests/Crowdin.Api.UnitTesting/Resources/Workflows.resx diff --git a/tests/Crowdin.Api.Tests/Core/TestUtils.cs b/tests/Crowdin.Api.UnitTesting/TestUtils.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/TestUtils.cs rename to tests/Crowdin.Api.UnitTesting/TestUtils.cs index 1c600814..c892e836 100644 --- a/tests/Crowdin.Api.Tests/Core/TestUtils.cs +++ b/tests/Crowdin.Api.UnitTesting/TestUtils.cs @@ -1,15 +1,13 @@ - + using System; using System.Collections.Generic; using System.Linq; - using Crowdin.Api.Core; using Crowdin.Api.Core.Converters; - using Moq; using Newtonsoft.Json; -namespace Crowdin.Api.Tests.Core +namespace Crowdin.Api.UnitTesting { public static class TestUtils { @@ -20,7 +18,7 @@ public static Mock CreateMockClientWithDefaultParser() mockClient .Setup(client => client.DefaultJsonParser) .Returns(CreateJsonParser); - + return mockClient; } @@ -57,16 +55,16 @@ public static JsonSerializerSettings CreateJsonSerializerOptions() } }; } - + public static string ToQueryString(this IDictionary queryParams) { return string.Join("&", queryParams.Select(kvPair => $"{kvPair.Key}={kvPair.Value}")); } - + public static string CompactJson(string jsonToCompact, JsonSerializerSettings? settings = null) { settings ??= CreateJsonSerializerOptions(); - + object? dataFromJson = JsonConvert.DeserializeObject(jsonToCompact, settings); if (dataFromJson is null) @@ -76,7 +74,7 @@ public static string CompactJson(string jsonToCompact, JsonSerializerSettings? s return JsonConvert.SerializeObject(dataFromJson, settings); } - + public static IDictionary CreateQueryParamsFromPaging(int limit = 25, int offset = 0) { return new Dictionary @@ -85,7 +83,7 @@ public static IDictionary CreateQueryParamsFromPaging(int limit { "offset", offset.ToString() } }; } - + public static string SerializeValue(object enumValue, JsonSerializerSettings? settings = null) { settings ??= CreateJsonSerializerOptions(); diff --git a/tests/Crowdin.Api.Tests/AI/AiPromptFineTuningDatasetsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptFineTuningDatasetsApiTests.cs similarity index 95% rename from tests/Crowdin.Api.Tests/AI/AiPromptFineTuningDatasetsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptFineTuningDatasetsApiTests.cs index 933f6242..207703af 100644 --- a/tests/Crowdin.Api.Tests/AI/AiPromptFineTuningDatasetsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptFineTuningDatasetsApiTests.cs @@ -11,10 +11,9 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiPromptFineTuningDatasetsApiTests { @@ -36,7 +35,7 @@ public async Task GenerateAiPromptFineTuningDataset() MinExamplesCount = 10, MaxExamplesCount = 50 }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_FineTuningDatasets.GenerateAiPromptFineTuningDataset_Request); Assert.Equal(expectedRequestJson, actualRequestJson); @@ -52,13 +51,13 @@ public async Task GenerateAiPromptFineTuningDataset() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningDataset) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningDataset? response = await executor.GenerateAiPromptFineTuningDataset(userId, aiPromptId, request); - + Assert_AiFineTuningDataset(response); } - + [Fact] public async Task GenerateAiPromptFineTuningDataset_Enterprise() { @@ -66,7 +65,7 @@ public async Task GenerateAiPromptFineTuningDataset_Enterprise() var request = new GenerateAiPromptFineTuningDatasetRequest { - ProjectIds = new[]{ 1, 2, 3 }, + ProjectIds = new[] { 1, 2, 3 }, Purpose = AiDatasetPurpose.Training, DateFrom = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00").ToLocalTime(), DateTo = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00").ToLocalTime(), @@ -74,7 +73,7 @@ public async Task GenerateAiPromptFineTuningDataset_Enterprise() MinExamplesCount = 10, MaxExamplesCount = 50 }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_FineTuningDatasets.GenerateAiPromptFineTuningDataset_Request); Assert.Equal(expectedRequestJson, actualRequestJson); @@ -90,10 +89,10 @@ public async Task GenerateAiPromptFineTuningDataset_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningDataset) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningDataset? response = await executor.GenerateAiPromptFineTuningDataset(userId: null, aiPromptId, request); - + Assert_AiFineTuningDataset(response); } @@ -103,9 +102,9 @@ public async Task GetAiPromptFineTuningDatasetGenerationStatus() const int userId = 1; const int aiPromptId = 2; const string jobIdentifier = "50fb3506-4127-4ba8-8296-f97dc7e3e0c3"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/fine-tuning/datasets/{jobIdentifier}"; mockClient @@ -115,21 +114,21 @@ public async Task GetAiPromptFineTuningDatasetGenerationStatus() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningDataset) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningDataset? response = await executor.GetAiPromptFineTuningDatasetGenerationStatus(userId, aiPromptId, jobIdentifier); - + Assert_AiFineTuningDataset(response); } - + [Fact] public async Task GetAiPromptFineTuningDatasetGenerationStatus_Enterprise() { const int aiPromptId = 1; const string jobIdentifier = "50fb3506-4127-4ba8-8296-f97dc7e3e0c3"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/fine-tuning/datasets/{jobIdentifier}"; mockClient @@ -139,10 +138,10 @@ public async Task GetAiPromptFineTuningDatasetGenerationStatus_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningDataset) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningDataset? response = await executor.GetAiPromptFineTuningDatasetGenerationStatus(userId: null, aiPromptId, jobIdentifier); - + Assert_AiFineTuningDataset(response); } @@ -180,13 +179,13 @@ public async Task CreateAiPromptFineTuningJob() MaxExamplesCount = 50 } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_FineTuningDatasets.CreateAiPromptFineTuningJob_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/fine-tuning/jobs"; mockClient @@ -196,13 +195,13 @@ public async Task CreateAiPromptFineTuningJob() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningJob) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningJob? response = await executor.CreateAiPromptFineTuningJob(userId, aiPromptId, request); - + Assert_AiFineTuningJob(response); } - + [Fact] public async Task CreateAiPromptFineTuningJob_Enterprise() { @@ -236,13 +235,13 @@ public async Task CreateAiPromptFineTuningJob_Enterprise() MaxExamplesCount = 50 } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_FineTuningDatasets.CreateAiPromptFineTuningJob_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/fine-tuning/jobs"; mockClient @@ -252,10 +251,10 @@ public async Task CreateAiPromptFineTuningJob_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningJob) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningJob? response = await executor.CreateAiPromptFineTuningJob(userId: null, aiPromptId, request); - + Assert_AiFineTuningJob(response); } @@ -265,9 +264,9 @@ public async Task GetAiPromptFineTuningJobStatus() const int userId = 1; const int aiPromptId = 2; const string jobIdentifier = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/fine-tuning/jobs/{jobIdentifier}"; mockClient @@ -277,21 +276,21 @@ public async Task GetAiPromptFineTuningJobStatus() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningJob) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningJob? response = await executor.GetAiPromptFineTuningJobStatus(userId, aiPromptId, jobIdentifier); - + Assert_AiFineTuningJob(response); } - + [Fact] public async Task GetAiPromptFineTuningJobStatus_Enterprise() { const int aiPromptId = 1; const string jobIdentifier = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/fine-tuning/jobs/{jobIdentifier}"; mockClient @@ -301,10 +300,10 @@ public async Task GetAiPromptFineTuningJobStatus_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_AiFineTuningJob) }); - + var executor = new AiApiExecutor(mockClient.Object); AiFineTuningJob? response = await executor.GetAiPromptFineTuningJobStatus(userId: null, aiPromptId, jobIdentifier); - + Assert_AiFineTuningJob(response); } @@ -314,7 +313,7 @@ public async Task DownloadAiPromptFineTuningDataset() const int userId = 1; const int aiPromptId = 2; const string jobIdentifier = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/users/{userId}/ai/prompts/{aiPromptId}/fine-tuning/datasets/{jobIdentifier}/download"; @@ -326,19 +325,19 @@ public async Task DownloadAiPromptFineTuningDataset() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_DownloadLink) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiPromptFineTuningDataset(userId, aiPromptId, jobIdentifier); - + Assert_DownloadLink(response); } - + [Fact] public async Task DownloadAiPromptFineTuningDataset_Enterprise() { const int aiPromptId = 1; const string jobIdentifier = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/ai/prompts/{aiPromptId}/fine-tuning/datasets/{jobIdentifier}/download"; @@ -350,21 +349,21 @@ public async Task DownloadAiPromptFineTuningDataset_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_FineTuningDatasets.CommonResponses_DownloadLink) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiPromptFineTuningDataset(userId: null, aiPromptId, jobIdentifier); - + Assert_DownloadLink(response); } private static void Assert_AiFineTuningDataset(AiFineTuningDataset? dataset) { ArgumentNullException.ThrowIfNull(dataset); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", dataset.Identifier); Assert.Equal(OperationStatus.Finished, dataset.Status); Assert.Equal(100, dataset.Progress); - + DateTimeOffset date = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00"); AiFineTuningDataset.AttributesObject? attributes = dataset.Attributes; @@ -376,7 +375,7 @@ private static void Assert_AiFineTuningDataset(AiFineTuningDataset? dataset) Assert.Equal(100, attributes.MaxFileSize); Assert.Equal(10, attributes.MinExamplesCount); Assert.Equal(50, attributes.MaxExamplesCount); - + Assert.Equal(date, dataset.CreatedAt); Assert.Equal(date, dataset.UpdatedAt); Assert.Equal(date, dataset.StartedAt); @@ -386,21 +385,21 @@ private static void Assert_AiFineTuningDataset(AiFineTuningDataset? dataset) private static void Assert_AiFineTuningJob(AiFineTuningJob? job) { ArgumentNullException.ThrowIfNull(job); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", job.Identifier); Assert.Equal(OperationStatus.Finished, job.Status); Assert.Equal(100, job.Progress); - + AiFineTuningJob.AttributesObject attributes = job.Attributes; ArgumentNullException.ThrowIfNull(attributes); Assert.True(attributes.DryRun); - + AiHyperParameters? hyperParameters = attributes.HyperParameters; ArgumentNullException.ThrowIfNull(hyperParameters); Assert.Equal(2, hyperParameters.BatchSize); Assert.Equal(0.2f, hyperParameters.LearningRateMultiplier); Assert.Equal(200, hyperParameters.NEpochs); - + DateTimeOffset date = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00"); AiTrainingOptions trainingOptions = attributes.TrainingOptions; @@ -411,7 +410,7 @@ private static void Assert_AiFineTuningJob(AiFineTuningJob? job) Assert.Equal(100, trainingOptions.MaxFileSize); Assert.Equal(10, trainingOptions.MinExamplesCount); Assert.Equal(50, trainingOptions.MaxExamplesCount); - + AiValidationOptions? validationOptions = attributes.ValidationOptions; ArgumentNullException.ThrowIfNull(validationOptions); Assert.Equal(new[] { 1, 2, 3 }, validationOptions.ProjectIds); @@ -425,7 +424,7 @@ private static void Assert_AiFineTuningJob(AiFineTuningJob? job) private static void Assert_DownloadLink(DownloadLink? link) { ArgumentNullException.ThrowIfNull(link); - + Assert.Equal("https://test.com", link.Url); Assert.Equal(DateTimeOffset.Parse("2019-09-20T10:31:21+00:00"), link.ExpireIn); } diff --git a/tests/Crowdin.Api.Tests/AI/AiPromptsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsApiTests.cs similarity index 94% rename from tests/Crowdin.Api.Tests/AI/AiPromptsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsApiTests.cs index f90ceeed..a09adfb7 100644 --- a/tests/Crowdin.Api.Tests/AI/AiPromptsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsApiTests.cs @@ -11,10 +11,9 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiPromptsApiTests { @@ -32,7 +31,7 @@ public async Task CloneAiPrompt() }; Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/clones"; mockClient @@ -45,7 +44,7 @@ public async Task CloneAiPrompt() var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.CloneAiPrompt(userId, aiPromptId, request); - + Assert_AiPrompt(response); } @@ -60,7 +59,7 @@ public async Task CloneAiPrompt_Enterprise() }; Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/clones"; mockClient @@ -73,7 +72,7 @@ public async Task CloneAiPrompt_Enterprise() var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.CloneAiPrompt(userId: null, aiPromptId, request); - + Assert_AiPrompt(response); } @@ -108,11 +107,11 @@ public async Task GenerateAiPromptCompletion() }, ToolChoice = "string" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Prompts.GenerateAiPromptCompletion_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/users/{userId}/ai/prompts/{aiPromptId}/completions"; @@ -127,10 +126,10 @@ public async Task GenerateAiPromptCompletion() var executor = new AiApiExecutor(mockClient.Object); AiPromptCompletion? response = await executor.GenerateAiPromptCompletion(userId, aiPromptId, request); - + Assert_AiPromptCompletion(response); } - + [Fact] public async Task GenerateAiPromptCompletion_Enterprise() { @@ -161,11 +160,11 @@ public async Task GenerateAiPromptCompletion_Enterprise() }, ToolChoice = "string" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Prompts.GenerateAiPromptCompletion_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/ai/prompts/{aiPromptId}/completions"; @@ -180,7 +179,7 @@ public async Task GenerateAiPromptCompletion_Enterprise() var executor = new AiApiExecutor(mockClient.Object); AiPromptCompletion? response = await executor.GenerateAiPromptCompletion(userId: null, aiPromptId, request); - + Assert_AiPromptCompletion(response); } @@ -190,9 +189,9 @@ public async Task GetAiPromptCompletionStatus() const int userId = 1; const int aiPromptId = 2; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/completions/{completionId}"; mockClient @@ -202,21 +201,21 @@ public async Task GetAiPromptCompletionStatus() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_AiPromptCompletion) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptCompletion? response = await executor.GetAiPromptCompletionStatus(userId, aiPromptId, completionId); - + Assert_AiPromptCompletion(response); } - + [Fact] public async Task GetAiPromptCompletionStatus_Enterprise() { const int aiPromptId = 1; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/completions/{completionId}"; mockClient @@ -226,10 +225,10 @@ public async Task GetAiPromptCompletionStatus_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_AiPromptCompletion) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptCompletion? response = await executor.GetAiPromptCompletionStatus(userId: null, aiPromptId, completionId); - + Assert_AiPromptCompletion(response); } @@ -239,33 +238,33 @@ public async Task CancelAiPromptCompletion() const int userId = 1; const int aiPromptId = 2; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/completions/{completionId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.CancelAiPromptCompletion(userId, aiPromptId, completionId); } - + [Fact] public async Task CancelAiPromptCompletion_Enterprise() { const int aiPromptId = 1; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/completions/{completionId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.CancelAiPromptCompletion(userId: null, aiPromptId, completionId); } @@ -276,9 +275,9 @@ public async Task DownloadAiPromptCompletion() const int userId = 1; const int aiPromptId = 2; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}/completions/{completionId}/download"; mockClient @@ -288,21 +287,21 @@ public async Task DownloadAiPromptCompletion() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.DownloadAiPromptCompletion_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiPromptCompletion(userId, aiPromptId, completionId); - + Assert.NotNull(response); } - + [Fact] public async Task DownloadAiPromptCompletion_Enterprise() { const int aiPromptId = 1; const string completionId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}/completions/{completionId}/download"; mockClient @@ -312,28 +311,28 @@ public async Task DownloadAiPromptCompletion_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.DownloadAiPromptCompletion_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiPromptCompletion(userId: null, aiPromptId, completionId); - + Assert.NotNull(response); } - + [Fact] public async Task ListAiPrompts() { const int userId = 1; const int projectId = 2; const AiPromptAction action = AiPromptAction.PreTranslate; - + IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); queryParams.Add("projectId", projectId.ToString()); queryParams.Add("action", action.ToDescriptionString()); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts"; - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -341,23 +340,23 @@ public async Task ListAiPrompts() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Multi) }); - + var executor = new AiApiExecutor(mockClient.Object); ResponseList? response = await executor.ListAiPrompts(userId, projectId, action); - + Assert.NotNull(response); Assert.Single(response.Data); - + Assert_AiPrompt(response.Data[0]); } - + [Fact] public async Task ListAiPrompts_Enterprise() { Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); - + mockClient .Setup(client => client.SendGetRequest("/ai/prompts", queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -365,18 +364,18 @@ public async Task ListAiPrompts_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Multi) }); - + var executor = new AiApiExecutor(mockClient.Object); var response = await executor.ListAiPrompts(userId: null); - + Assert_AiPrompt(response.Data[0]); } - + [Fact] public async Task AddAiPrompt() { const int userId = 1; - + var request = new AddAiPromptRequest { Name = "Pre-translate prompt", @@ -402,15 +401,15 @@ public async Task AddAiPrompt() PublicProjectDescription = true } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Prompts.AddAiPrompt_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -418,20 +417,20 @@ public async Task AddAiPrompt() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.AddAiPrompt(userId, request); - + Assert_AiPrompt(response); } - + [Fact] public async Task AddAiPrompt_Enterprise() { var request = new AddAiPromptRequest(); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + mockClient .Setup(client => client.SendPostRequest("/ai/prompts", request, null)) .ReturnsAsync(new CrowdinApiResult @@ -439,23 +438,23 @@ public async Task AddAiPrompt_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.AddAiPrompt(userId: null, request); - + Assert_AiPrompt(response); } - + [Fact] public async Task GetAiPrompt() { const int userId = 1; const int aiPromptId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -463,22 +462,22 @@ public async Task GetAiPrompt() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.GetAiPrompt(userId, aiPromptId); - + Assert_AiPrompt(response); } - + [Fact] public async Task GetAiPrompt_Enterprise() { const int aiPromptId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -486,54 +485,54 @@ public async Task GetAiPrompt_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.GetAiPrompt(userId: null, aiPromptId); - + Assert_AiPrompt(response); } - + [Fact] public async Task DeleteAiPrompt() { const int userId = 1; const int aiPromptId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.DeleteAiPrompt(userId, aiPromptId); } - + [Fact] public async Task DeleteAiPrompt_Enterprise() { const int aiPromptId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.DeleteAiPrompt(userId: null, aiPromptId); } - + [Fact] public async Task EditAiPrompt() { const int userId = 1; const int aiPromptId = 2; - + var patches = new[] { new AiPromptPatch @@ -549,15 +548,15 @@ public async Task EditAiPrompt() Value = 1 } }; - + string actualRequestJson = JsonConvert.SerializeObject(patches, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Prompts.EditAiPrompt_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendPatchRequest(url, patches, null)) .ReturnsAsync(new CrowdinApiResult @@ -565,24 +564,24 @@ public async Task EditAiPrompt() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.EditAiPrompt(userId, aiPromptId, patches); - + Assert_AiPrompt(response); } - + [Fact] public async Task EditAiPrompt_Enterprise() { const int aiPromptId = 1; - + AiPromptPatch[] patches = Array.Empty(); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/prompts/{aiPromptId}"; - + mockClient .Setup(client => client.SendPatchRequest(url, patches, null)) .ReturnsAsync(new CrowdinApiResult @@ -590,18 +589,18 @@ public async Task EditAiPrompt_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Prompts.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiPromptResource? response = await executor.EditAiPrompt(userId: null, aiPromptId, patches); - + Assert_AiPrompt(response); } - + private static void Assert_AiPrompt(AiPromptResource? prompt) { Assert.NotNull(prompt); ArgumentNullException.ThrowIfNull(prompt); - + Assert.Equal(2, prompt.Id); Assert.Equal("Pre-translate prompt", prompt.Name); Assert.Equal(AiPromptAction.PreTranslate, prompt.Action); @@ -609,7 +608,7 @@ private static void Assert_AiPrompt(AiPromptResource? prompt) Assert.Equal("gpt-3.5-turbo-instruct", prompt.AiModelId); Assert.True(prompt.IsEnabled); Assert.Equal(new[] { 1 }, prompt.EnabledProjectIds); - + var config = prompt.Configuration as BasicModeAiPromptConfiguration; Assert.NotNull(config); ArgumentNullException.ThrowIfNull(config); @@ -620,12 +619,12 @@ private static void Assert_AiPrompt(AiPromptResource? prompt) Assert.True(config.TmSuggestions); Assert.True(config.FileContent); Assert.True(config.PublicProjectDescription); - + OtherLanguageTranslationsConfig? otherLanguageTranslations = config.OtherLanguageTranslations; ArgumentNullException.ThrowIfNull(otherLanguageTranslations); Assert.True(otherLanguageTranslations.IsEnabled); Assert.Equal(new[] { "uk" }, otherLanguageTranslations.LanguageIds); - + Assert.Equal(DateTimeOffset.Parse("2019-09-20T11:11:05+00:00"), prompt.CreatedAt); Assert.Equal(DateTimeOffset.Parse("2019-09-20T12:22:20+00:00"), prompt.UpdatedAt); } @@ -633,7 +632,7 @@ private static void Assert_AiPrompt(AiPromptResource? prompt) private static void Assert_AiPromptCompletion(AiPromptCompletion? completion) { ArgumentNullException.ThrowIfNull(completion); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", completion.Identifier); Assert.Equal(OperationStatus.Finished, completion.Status); Assert.Equal(100, completion.Progress); diff --git a/tests/Crowdin.Api.Tests/AI/AiPromptsSerializationTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsSerializationTests.cs similarity index 87% rename from tests/Crowdin.Api.Tests/AI/AiPromptsSerializationTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsSerializationTests.cs index 1b375894..0b47d0ef 100644 --- a/tests/Crowdin.Api.Tests/AI/AiPromptsSerializationTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiPromptsSerializationTests.cs @@ -5,39 +5,38 @@ using Xunit; using Crowdin.Api.AI; -using Crowdin.Api.Tests.Core; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiPromptsSerializationTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public void DeserializeAiPromptConfiguration_Basic() { const string json = "{\"mode\": \"basic\"}"; DeserializeAndAssert(json); } - + [Fact] public void DeserializeAiPromptConfiguration_Advanced() { const string json = "{\"mode\": \"advanced\", \"prompt\": \"test\"}"; var @object = DeserializeAndAssert(json); - + Assert.Equal(AiPromptMode.Advanced, @object.Mode); Assert.Equal("test", @object.Prompt); } - + private static TType DeserializeAndAssert(string json) where TType : AiPromptConfiguration { var config = JsonConvert.DeserializeObject(json, JsonSettings); - + ArgumentNullException.ThrowIfNull(config); Assert.IsType(config); - - return (TType) config; + + return (TType)config; } } } \ No newline at end of file diff --git a/tests/Crowdin.Api.Tests/AI/AiProvidersApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersApiTests.cs similarity index 92% rename from tests/Crowdin.Api.Tests/AI/AiProvidersApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersApiTests.cs index a775b52f..fe82bc43 100644 --- a/tests/Crowdin.Api.Tests/AI/AiProvidersApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersApiTests.cs @@ -12,27 +12,26 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiProvidersApiTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + #region Crowdin - + [Fact] public async Task ListAiProviders() { const int userId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers"; IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -40,20 +39,20 @@ public async Task ListAiProviders() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Multi) }); - + var executor = new AiApiExecutor(mockClient.Object); ResponseList? response = await executor.ListAiProviders(userId); - + Assert.NotNull(response); Assert.Single(response.Data); Assert_AiProvider(response.Data[0]); } - + [Fact] public async Task AddAiProvider() { const int userId = 1; - + var request = new AddAiProviderRequest() { Name = "OpenAI", @@ -79,15 +78,15 @@ public async Task AddAiProvider() IsEnabled = true, UseSystemCredentials = false }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Providers.AddAiProvider_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -95,23 +94,23 @@ public async Task AddAiProvider() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.AddAiProvider(userId, request); - + Assert_AiProvider(response); } - + [Fact] public async Task GetAiProvider() { const int userId = 1; const int aiProviderId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -119,37 +118,37 @@ public async Task GetAiProvider() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.GetAiProvider(userId, aiProviderId); - + Assert_AiProvider(response); } - + [Fact] public async Task DeleteAiProvider() { const int userId = 1; const int aiProviderId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.DeleteAiProvider(userId, aiProviderId); } - + [Fact] public async Task EditAiProvider() { const int userId = 1; const int aiProviderId = 2; - + var request = new[] { new AiProviderPatch @@ -165,15 +164,15 @@ public async Task EditAiProvider() Value = AiProviderType.OpenAi } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Providers.EditAiProvider_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + var mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendPatchRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -181,23 +180,23 @@ public async Task EditAiProvider() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.EditAiProvider(userId, aiProviderId, request); - + Assert_AiProvider(response); } - + [Fact] public async Task ListAiProviderModels() { const int userId = 1; const int aiProviderId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers/{aiProviderId}/models"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -205,28 +204,28 @@ public async Task ListAiProviderModels() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.ListAiProviderModels_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); ResponseList? response = await executor.ListAiProviderModels(userId, aiProviderId); - + AiProviderModelResource? model = response?.Data?.FirstOrDefault(); ArgumentNullException.ThrowIfNull(model); - + Assert.Equal("gpt-3.5-turbo-instruct", model.Id); } - + #endregion - + #region Enterprise - + [Fact] public async Task ListAiProvidersEnterprise() { Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + const string url = "/ai/providers"; IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -234,13 +233,13 @@ public async Task ListAiProvidersEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Multi) }); - + var executor = new AiApiExecutor(mockClient.Object); ResponseList? response = await executor.ListAiProviders(userId: null); - + Assert_AiProvider(response?.Data?.FirstOrDefault()); } - + [Fact] public async Task AddAiProviderEnterprise() { @@ -269,15 +268,15 @@ public async Task AddAiProviderEnterprise() IsEnabled = true, UseSystemCredentials = false }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Providers.AddAiProvider_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + const string url = "/ai/providers"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -285,22 +284,22 @@ public async Task AddAiProviderEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.AddAiProvider(userId: null, request); - + Assert_AiProvider(response); } - + [Fact] public async Task GetAiProviderEnterprise() { const int aiProviderId = 1; - + var mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -308,41 +307,41 @@ public async Task GetAiProviderEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.GetAiProvider(userId: null, aiProviderId); - + Assert_AiProvider(response); } - + [Fact] public async Task DeleteAiProviderEnterprise() { const int aiProviderId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new AiApiExecutor(mockClient.Object); await executor.DeleteAiProvider(userId: null, aiProviderId); } - + [Fact] public async Task EditAiProviderEnterprise() { const int aiProviderId = 1; - + AiProviderPatch[] request = Array.Empty(); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/providers/{aiProviderId}"; - + mockClient .Setup(client => client.SendPatchRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -350,22 +349,22 @@ public async Task EditAiProviderEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.CommonResponses_Single) }); - + var executor = new AiApiExecutor(mockClient.Object); AiProviderResource? response = await executor.EditAiProvider(userId: null, aiProviderId, request); - + Assert_AiProvider(response); } - + [Fact] public async Task ListAiProviderModelsEnterprise() { const int aiProviderId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/providers/{aiProviderId}/models"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult @@ -373,24 +372,24 @@ public async Task ListAiProviderModelsEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Providers.ListAiProviderModels_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); ResponseList? response = await executor.ListAiProviderModels(userId: null, aiProviderId); - + AiProviderModelResource? model = response?.Data.FirstOrDefault(); ArgumentNullException.ThrowIfNull(model); - + Assert.Equal("gpt-3.5-turbo-instruct", model.Id); } - + #endregion - + private static void Assert_AiProvider(AiProviderResource? aiProvider) { Assert.NotNull(aiProvider); ArgumentNullException.ThrowIfNull(aiProvider); - + Assert.Equal(2, aiProvider.Id); Assert.Equal("OpenAI", aiProvider.Name); Assert.Equal(AiProviderType.OpenAi, aiProvider.Type); @@ -398,10 +397,10 @@ private static void Assert_AiProvider(AiProviderResource? aiProvider) Assert.False(aiProvider.UseSystemCredentials); Assert.Equal(DateTimeOffset.Parse("2019-09-20T11:11:05+00:00"), aiProvider.CreatedAt); Assert.Equal(DateTimeOffset.Parse("2019-09-20T12:22:20+00:00"), aiProvider.UpdatedAt); - + ActionRule? actionRule = aiProvider.Config?.ActionRules?.FirstOrDefault(); ArgumentNullException.ThrowIfNull(actionRule); - + Assert.Equal(AiPromptAction.PreTranslate, actionRule.Action); Assert.Equal(new[] { diff --git a/tests/Crowdin.Api.Tests/AI/AiProvidersSerializationTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersSerializationTests.cs similarity index 90% rename from tests/Crowdin.Api.Tests/AI/AiProvidersSerializationTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersSerializationTests.cs index 31d6b304..9def9ff1 100644 --- a/tests/Crowdin.Api.Tests/AI/AiProvidersSerializationTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProvidersSerializationTests.cs @@ -5,84 +5,83 @@ using Xunit; using Crowdin.Api.AI; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiProvidersSerializationTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public void DeserializeAiProviderCredentials_OpenAi() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_OpenAi); - + Assert.Equal("key", @object.ApiKey); } - + [Fact] public void DeserializeAiProviderCredentials_AzureOpenAi() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_AzureOpenAi); - + Assert.Equal("resource", @object.ResourceName); Assert.Equal("key", @object.ApiKey); Assert.Equal("deployment", @object.DeploymentName); Assert.Equal("1.0.0", @object.ApiVersion); } - + [Fact] public void DeserializeAiProviderCredentials_GoogleGemini() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_GoogleGemini); - + Assert.Equal("project", @object.Project); Assert.Equal("region", @object.Region); Assert.Equal("serviceAccountKey", @object.ServiceAccountKey); } - + [Fact] public void DeserializeAiProviderCredentials_MistralAi() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_MistralAi); - + Assert.Equal("key", @object.ApiKey); } - + [Fact] public void DeserializeAiProviderCredentials_Anthropic() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_Anthropic); - + Assert.Equal("key", @object.ApiKey); } - + [Fact] public void DeserializeAiProviderCredentials_CustomAi() { var @object = DeserializeAndAssert( json: AI_Providers.Serialization_AiProvider_Credentials_CustomAi); - + Assert.Equal("id", @object.Identifier); Assert.Equal("key", @object.Key); } - + private static TType DeserializeAndAssert(string json) where TType : AiProviderCredentials { var aiProvider = JsonConvert.DeserializeObject(json, JsonSettings); - + ArgumentNullException.ThrowIfNull(aiProvider); ArgumentNullException.ThrowIfNull(aiProvider.Credentials); Assert.IsType(aiProvider.Credentials); - - return (TType) aiProvider.Credentials; + + return (TType)aiProvider.Credentials; } } } \ No newline at end of file diff --git a/tests/Crowdin.Api.Tests/AI/AiProxyChatCompletionApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProxyChatCompletionApiTests.cs similarity index 90% rename from tests/Crowdin.Api.Tests/AI/AiProxyChatCompletionApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiProxyChatCompletionApiTests.cs index 4317560b..0bd72a0c 100644 --- a/tests/Crowdin.Api.Tests/AI/AiProxyChatCompletionApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiProxyChatCompletionApiTests.cs @@ -9,34 +9,33 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiProxyChatCompletionApiTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task CreateAiProxyChatCompletion() { const int userId = 1; const int aiProviderId = 2; - + var request = new Dictionary { ["model"] = "string" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Misc.CreateAiProxyChatCompletion_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/providers/{aiProviderId}/chat/completions"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -44,32 +43,32 @@ public async Task CreateAiProxyChatCompletion() StatusCode = HttpStatusCode.OK, JsonObject = new() }); - + var executor = new AiApiExecutor(mockClient.Object); AiProxyChatCompletion? response = await executor.CreateAiProxyChatCompletion(userId, aiProviderId, request); - + Assert.NotNull(response); } - + [Fact] public async Task CreateAiProxyChatCompletionEnterprise() { const int aiProviderId = 1; - + var request = new Dictionary { ["model"] = "string" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Misc.CreateAiProxyChatCompletion_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/ai/providers/{aiProviderId}/chat/completions"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult @@ -77,11 +76,11 @@ public async Task CreateAiProxyChatCompletionEnterprise() StatusCode = HttpStatusCode.OK, JsonObject = new() }); - + var executor = new AiApiExecutor(mockClient.Object); AiProxyChatCompletion? response = await executor.CreateAiProxyChatCompletion(userId: null, aiProviderId, request); - + Assert.NotNull(response); } } diff --git a/tests/Crowdin.Api.Tests/AI/AiReportsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiReportsApiTests.cs similarity index 95% rename from tests/Crowdin.Api.Tests/AI/AiReportsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiReportsApiTests.cs index 851a0bf8..ff50854e 100644 --- a/tests/Crowdin.Api.Tests/AI/AiReportsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiReportsApiTests.cs @@ -10,20 +10,19 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiReportsApiTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task GenerateAiReport() { const int userId = 1; - + var request = new TokensUsageRawDataGenerateAiReport { Schema = new TokensUsageRawDataGenerateAiReport.GeneralSchema @@ -36,7 +35,7 @@ public async Task GenerateAiReport() UserIds = new[] { 1 } } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Reports.GenerateAiReport_Request); Assert.Equal(expectedRequestJson, actualRequestJson); @@ -55,10 +54,10 @@ public async Task GenerateAiReport() var executor = new AiApiExecutor(mockClient.Object); AiReportGenerationStatus? response = await executor.GenerateAiReport(userId, request); - + Assert_AiReportGenerationStatus(response); } - + [Fact] public async Task GenerateAiReport_Enterprise() { @@ -74,7 +73,7 @@ public async Task GenerateAiReport_Enterprise() UserIds = new[] { 1 } } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Reports.GenerateAiReport_Request); Assert.Equal(expectedRequestJson, actualRequestJson); @@ -91,7 +90,7 @@ public async Task GenerateAiReport_Enterprise() var executor = new AiApiExecutor(mockClient.Object); AiReportGenerationStatus? response = await executor.GenerateAiReport(userId: null, request); - + Assert_AiReportGenerationStatus(response); } @@ -100,9 +99,9 @@ public async Task CheckAiReportGenerationStatus() { const int userId = 1; const string aiReportId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/reports/{aiReportId}"; mockClient @@ -112,20 +111,20 @@ public async Task CheckAiReportGenerationStatus() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Reports.CommonResponses_AiReportGenerationStatus) }); - + var executor = new AiApiExecutor(mockClient.Object); AiReportGenerationStatus? response = await executor.CheckAiReportGenerationStatus(userId, aiReportId); - + Assert_AiReportGenerationStatus(response); } - + [Fact] public async Task CheckAiReportGenerationStatus_Enterprise() { const string aiReportId = "123"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + const string url = $"/ai/reports/{aiReportId}"; mockClient @@ -135,10 +134,10 @@ public async Task CheckAiReportGenerationStatus_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Reports.CommonResponses_AiReportGenerationStatus) }); - + var executor = new AiApiExecutor(mockClient.Object); AiReportGenerationStatus? response = await executor.CheckAiReportGenerationStatus(userId: null, aiReportId); - + Assert_AiReportGenerationStatus(response); } @@ -149,7 +148,7 @@ public async Task DownloadAiReport() const string aiReportId = "123"; Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/reports/{aiReportId}/download"; mockClient @@ -159,20 +158,20 @@ public async Task DownloadAiReport() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Reports.DownloadAiReport_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiReport(userId, aiReportId); - + Assert.NotNull(response); } - + [Fact] public async Task DownloadAiReport_Enterprise() { const string aiReportId = "123"; Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + const string url = $"/ai/reports/{aiReportId}/download"; mockClient @@ -182,17 +181,17 @@ public async Task DownloadAiReport_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Reports.DownloadAiReport_Response) }); - + var executor = new AiApiExecutor(mockClient.Object); DownloadLink? response = await executor.DownloadAiReport(userId: null, aiReportId); - + Assert.NotNull(response); } private static void Assert_AiReportGenerationStatus(AiReportGenerationStatus? status) { ArgumentNullException.ThrowIfNull(status); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", status.Identifier); Assert.Equal(OperationStatus.Finished, status.Status); Assert.Equal(100, status.Progress); @@ -201,7 +200,7 @@ private static void Assert_AiReportGenerationStatus(AiReportGenerationStatus? st ArgumentNullException.ThrowIfNull(attributes); Assert.Equal(AiReportFormat.Json, attributes.Format); Assert.Equal(AiReportType.TokensUsageRawData, attributes.ReportType); - + DateTimeOffset date = DateTimeOffset.Parse("2024-01-23T11:26:54+00:00"); Assert.Equal(date, status.CreatedAt.ToUniversalTime()); Assert.Equal(date, status.UpdatedAt.ToUniversalTime()); diff --git a/tests/Crowdin.Api.Tests/AI/AiSettingsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiSettingsApiTests.cs similarity index 93% rename from tests/Crowdin.Api.Tests/AI/AiSettingsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/AI/AiSettingsApiTests.cs index de38a191..270a9977 100644 --- a/tests/Crowdin.Api.Tests/AI/AiSettingsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/AI/AiSettingsApiTests.cs @@ -11,10 +11,9 @@ using Crowdin.Api.AI; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.AI +namespace Crowdin.Api.UnitTesting.Tests.AI { public class AiSettingsApiTests { @@ -26,7 +25,7 @@ public async Task GetAiSettings() const int userId = 1; Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/settings"; mockClient @@ -36,13 +35,13 @@ public async Task GetAiSettings() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Settings.CommonResponses_AiSettings) }); - + var executor = new AiApiExecutor(mockClient.Object); AiSettings? response = await executor.GetAiSettings(userId); - + Assert_AiSettings(response); } - + [Fact] public async Task GetAiSettings_Enterprise() { @@ -55,13 +54,13 @@ public async Task GetAiSettings_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Settings.CommonResponses_AiSettings) }); - + var executor = new AiApiExecutor(mockClient.Object); AiSettings? response = await executor.GetAiSettings(userId: null); - + Assert_AiSettings(response); } - + [Fact] public async Task EditAiSettings() { @@ -76,13 +75,13 @@ public async Task EditAiSettings() Value = true } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Settings.EditAiSettings_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/users/{userId}/ai/settings"; mockClient @@ -92,13 +91,13 @@ public async Task EditAiSettings() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Settings.CommonResponses_AiSettings) }); - + var executor = new AiApiExecutor(mockClient.Object); AiSettings? response = await executor.EditAiSettings(userId, request); - + Assert_AiSettings(response); } - + [Fact] public async Task EditAiSettings_Enterprise() { @@ -111,11 +110,11 @@ public async Task EditAiSettings_Enterprise() Value = true } }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); string expectedRequestJson = TestUtils.CompactJson(AI_Settings.EditAiSettings_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); mockClient @@ -125,17 +124,17 @@ public async Task EditAiSettings_Enterprise() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(AI_Settings.CommonResponses_AiSettings) }); - + var executor = new AiApiExecutor(mockClient.Object); AiSettings? response = await executor.EditAiSettings(userId: null, request); - + Assert_AiSettings(response); } private static void Assert_AiSettings(AiSettings? settings) { ArgumentNullException.ThrowIfNull(settings); - + Assert.Equal(2, settings.AssistActionAiPromptId); Assert.True(settings.ShowSuggestion); diff --git a/tests/Crowdin.Api.Tests/Applications/ApplicationsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsApiTests.cs similarity index 92% rename from tests/Crowdin.Api.Tests/Applications/ApplicationsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsApiTests.cs index 6d4f51e3..f8d951cd 100644 --- a/tests/Crowdin.Api.Tests/Applications/ApplicationsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsApiTests.cs @@ -2,13 +2,12 @@ using System.Threading.Tasks; using Crowdin.Api.Applications; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Applications +namespace Crowdin.Api.UnitTesting.Tests.Applications { public class ApplicationsApiTests { @@ -26,7 +25,7 @@ public async Task GetApplicationData() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Applications.GetApplicationData_Response) + JsonObject = JObject.Parse(Resources.Applications.GetApplicationData_Response) }); var executor = new ApplicationsApiExecutor(mockClient.Object); var response = await executor.GetApplicationData(applicationIdentifier, path); diff --git a/tests/Crowdin.Api.Tests/Applications/ApplicationsInstallationsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsInstallationsApiTests.cs similarity index 91% rename from tests/Crowdin.Api.Tests/Applications/ApplicationsInstallationsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsInstallationsApiTests.cs index 7d54d917..141bce64 100644 --- a/tests/Crowdin.Api.Tests/Applications/ApplicationsInstallationsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Applications/ApplicationsInstallationsApiTests.cs @@ -1,6 +1,5 @@ using Crowdin.Api.Applications; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -10,7 +9,7 @@ using System.Threading.Tasks; using Xunit; -namespace Crowdin.Api.Tests.Applications +namespace Crowdin.Api.UnitTesting.Tests.Applications { public class ApplicationsInstallationsApiTests { @@ -25,7 +24,7 @@ public async Task GetApplicationInstallation() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Applications.GetApplicationInstallation_Response) + JsonObject = JObject.Parse(Resources.Applications.GetApplicationInstallation_Response) }); var executor = new ApplicationsApiExecutor(mockClient.Object); Application? response = await executor.GetApplicationInstallation(applicationIdentifier); @@ -42,7 +41,7 @@ public async Task GetApplicationInstallations() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Applications.ListApplicationInstallation_Response) + JsonObject = JObject.Parse(Resources.Applications.ListApplicationInstallation_Response) }); var executor = new ApplicationsApiExecutor(mockClient.Object); var response = await executor.ListApplicationInstallations(); @@ -74,7 +73,7 @@ public async Task InstallApplication() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Applications.GetApplicationInstallation_Response) + JsonObject = JObject.Parse(Resources.Applications.GetApplicationInstallation_Response) }); var executor = new ApplicationsApiExecutor(mockClient.Object); var response = await executor.InstallApplication(request); @@ -112,7 +111,7 @@ public async Task EditApplicationInstallation() }; string actualRequestJson = JsonConvert.SerializeObject(patches, TestUtils.CreateJsonSerializerOptions()); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Applications.EditInstallation_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Applications.EditInstallation_Request); Assert.Equal(expectedRequestJson, actualRequestJson); var url = $"/applications/installations/{applicationIdentifier}"; @@ -122,7 +121,7 @@ public async Task EditApplicationInstallation() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Applications.GetApplicationInstallation_Response) + JsonObject = JObject.Parse(Resources.Applications.GetApplicationInstallation_Response) }); var executor = new ApplicationsApiExecutor(mockClient.Object); diff --git a/tests/Crowdin.Api.Tests/Branches/BranchesCrudApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesCrudApiTests.cs similarity index 83% rename from tests/Crowdin.Api.Tests/Branches/BranchesCrudApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesCrudApiTests.cs index 77431851..28fcc4e4 100644 --- a/tests/Crowdin.Api.Tests/Branches/BranchesCrudApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesCrudApiTests.cs @@ -12,123 +12,122 @@ using Crowdin.Api.Branches; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -namespace Crowdin.Api.Tests.Branches +namespace Crowdin.Api.UnitTesting.Tests.Branches { public class BranchesApiTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task ListBranches() { const int projectId = 1; const string branchName = "name"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches"; - + IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); queryParams.Add("name", branchName); - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_Common_Multi) + JsonObject = JObject.Parse(Resources.Branches.Response_Common_Multi) }); - + var executor = new BranchesApiExecutor(mockClient.Object); ResponseList response = await executor.ListBranches(projectId, branchName); - + Branch? branch = response.Data.FirstOrDefault(); Assert_Branch(branch); } - + [Fact] public async Task AddBranch() { const int projectId = 1; - + var request = new AddBranchRequest { Name = "develop-master", Title = "Master branch" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Branches.Request_AddBranch); + string expectedRequestJson = TestUtils.CompactJson(Resources.Branches.Request_AddBranch); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Created, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_Common_Single) + JsonObject = JObject.Parse(Resources.Branches.Response_Common_Single) }); - + var executor = new BranchesApiExecutor(mockClient.Object); Branch response = await executor.AddBranch(projectId, request); - + Assert_Branch(response); } - + [Fact] public async Task GetBranch() { const int projectId = 1; const int branchId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_Common_Single) + JsonObject = JObject.Parse(Resources.Branches.Response_Common_Single) }); - + var executor = new BranchesApiExecutor(mockClient.Object); Branch response = await executor.GetBranch(projectId, branchId); - + Assert_Branch(response); } - + [Fact] public async Task DeleteBranch() { const int projectId = 1; const int branchId = 2; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}"; - + mockClient .Setup(client => client.SendDeleteRequest(url, null)) .ReturnsAsync(HttpStatusCode.NoContent); - + var executor = new BranchesApiExecutor(mockClient.Object); await executor.DeleteBranch(projectId, branchId); } - + [Fact] public async Task EditBranch() { const int projectId = 1; const int branchId = 2; - + var patches = new[] { new BranchPatch @@ -144,33 +143,33 @@ public async Task EditBranch() Value = "Master branch" } }; - + string actualRequestJson = JsonConvert.SerializeObject(patches, JsonSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Branches.Request_EditBranch); + string expectedRequestJson = TestUtils.CompactJson(Resources.Branches.Request_EditBranch); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}"; - + mockClient .Setup(client => client.SendPatchRequest(url, patches, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_Common_Single) + JsonObject = JObject.Parse(Resources.Branches.Response_Common_Single) }); - + var executor = new BranchesApiExecutor(mockClient.Object); Branch response = await executor.EditBranch(projectId, branchId, patches); - + Assert_Branch(response); } - + private static void Assert_Branch(Branch? branch) { ArgumentNullException.ThrowIfNull(branch); - + Assert.Equal(34, branch.Id); Assert.Equal(2, branch.ProjectId); Assert.Equal("develop-master", branch.Name); diff --git a/tests/Crowdin.Api.Tests/Branches/BranchesOperationsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesOperationsApiTests.cs similarity index 85% rename from tests/Crowdin.Api.Tests/Branches/BranchesOperationsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesOperationsApiTests.cs index af76fd58..1f02849c 100644 --- a/tests/Crowdin.Api.Tests/Branches/BranchesOperationsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Branches/BranchesOperationsApiTests.cs @@ -10,187 +10,186 @@ using Crowdin.Api.Branches; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; -namespace Crowdin.Api.Tests.Branches +namespace Crowdin.Api.UnitTesting.Tests.Branches { public class BranchesOperationsApiTests { private static readonly JsonSerializerSettings JsonSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task GetClonedBranch() { const int projectId = 1; const int branchId = 2; const string cloneId = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/clones/{cloneId}/branch"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_Common_Single) + JsonObject = JObject.Parse(Resources.Branches.Response_Common_Single) }); - + var executor = new BranchesApiExecutor(mockClient.Object); Branch response = await executor.GetClonedBranch(projectId, branchId, cloneId); - + Assert_Branch(response); } - + [Fact] public async Task CloneBranch() { const int projectId = 1; const int branchId = 2; - + var request = new CloneBranchRequest { Name = "develop-master", Title = "Master branch" }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Branches.Request_CloneBranch); + string expectedRequestJson = TestUtils.CompactJson(Resources.Branches.Request_CloneBranch); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/clones"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Accepted, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_BranchCloneStatus) + JsonObject = JObject.Parse(Resources.Branches.Response_BranchCloneStatus) }); - + var executor = new BranchesApiExecutor(mockClient.Object); BranchCloneStatus response = await executor.CloneBranch(projectId, branchId, request); - + Assert_BranchCloneStatus(response); } - + [Fact] public async Task CheckBranchCloneStatus() { const int projectId = 1; const int branchId = 2; const string cloneId = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/clones/{cloneId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_BranchCloneStatus) + JsonObject = JObject.Parse(Resources.Branches.Response_BranchCloneStatus) }); - + var executor = new BranchesApiExecutor(mockClient.Object); BranchCloneStatus response = await executor.CheckBranchCloneStatus(projectId, branchId, cloneId); - + Assert_BranchCloneStatus(response); } - + [Fact] public async Task MergeBranch() { const int projectId = 1; const int branchId = 2; - + var request = new MergeBranchRequest { DeleteAfterMerge = true, SourceBranchId = 8, DryRun = true }; - + string actualRequestJson = JsonConvert.SerializeObject(request, JsonSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Branches.Request_MergeBranch); + string expectedRequestJson = TestUtils.CompactJson(Resources.Branches.Request_MergeBranch); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/merges"; - + mockClient .Setup(client => client.SendPostRequest(url, request, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Accepted, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_BranchMergeStatus) + JsonObject = JObject.Parse(Resources.Branches.Response_BranchMergeStatus) }); - + var executor = new BranchesApiExecutor(mockClient.Object); BranchMergeStatus response = await executor.MergeBranch(projectId, branchId, request); - + Assert_BranchMergeStatus(response); } - + [Fact] public async Task CheckBranchMergeStatus() { const int projectId = 1; const int branchId = 2; const string mergeId = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/merges/{mergeId}"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_BranchMergeStatus) + JsonObject = JObject.Parse(Resources.Branches.Response_BranchMergeStatus) }); - + var executor = new BranchesApiExecutor(mockClient.Object); BranchMergeStatus response = await executor.CheckBranchMergeStatus(projectId, branchId, mergeId); - + Assert_BranchMergeStatus(response); } - + [Fact] public async Task GetBranchMergeSummary() { const int projectId = 1; const int branchId = 2; const string mergeId = "id"; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{projectId}/branches/{branchId}/merges/{mergeId}/summary"; - + mockClient .Setup(client => client.SendGetRequest(url, null)) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Branches.Response_BranchMergeSummary) + JsonObject = JObject.Parse(Resources.Branches.Response_BranchMergeSummary) }); - + var executor = new BranchesApiExecutor(mockClient.Object); BranchMergeSummary response = await executor.GetBranchMergeSummary(projectId, branchId, mergeId); - + Assert_BranchMergeSummary(response); } - + private static void Assert_Branch(Branch? branch) { ArgumentNullException.ThrowIfNull(branch); - + Assert.Equal(34, branch.Id); Assert.Equal(2, branch.ProjectId); Assert.Equal("develop-master", branch.Name); @@ -198,52 +197,52 @@ private static void Assert_Branch(Branch? branch) Assert.Equal(DateTimeOffset.Parse("2019-09-16T13:48:04+00:00"), branch.CreatedAt); Assert.Equal(DateTimeOffset.Parse("2019-09-19T13:25:27+00:00"), branch.UpdatedAt); } - + private static void Assert_BranchCloneStatus(BranchCloneStatus? status) { ArgumentNullException.ThrowIfNull(status); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", status.Identifier); Assert.Equal(OperationStatus.Finished, status.Status); Assert.Equal(100, status.Progress); Assert.NotNull(status.Attributes); - + DateTimeOffset date = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00"); Assert.Equal(date, status.CreatedAt); Assert.Equal(date, status.UpdatedAt); Assert.Equal(date, status.StartedAt); Assert.Equal(date, status.FinishedAt); } - + private static void Assert_BranchMergeStatus(BranchMergeStatus? status) { ArgumentNullException.ThrowIfNull(status); - + Assert.Equal("50fb3506-4127-4ba8-8296-f97dc7e3e0c3", status.Identifier); Assert.Equal(OperationStatus.Finished, status.Status); Assert.Equal(100, status.Progress); - + BranchMergeStatus.AttributesData? attributes = status.Attributes; ArgumentNullException.ThrowIfNull(status.Attributes); Assert.Equal(38, attributes.SourceBranchId); Assert.False(attributes.DeleteAfterMerge); - + DateTimeOffset date = DateTimeOffset.Parse("2019-09-23T11:26:54+00:00"); Assert.Equal(date, status.CreatedAt); Assert.Equal(date, status.UpdatedAt); Assert.Equal(date, status.StartedAt); Assert.Equal(date, status.FinishedAt); } - + private static void Assert_BranchMergeSummary(BranchMergeSummary? summary) { ArgumentNullException.ThrowIfNull(summary); - + Assert.Equal(BranchMergeStatusId.Merged, summary.Status); Assert.Equal(100, summary.SourceBranchId); Assert.Equal(100, summary.TargetBranchId); Assert.False(summary.DryRun); - + BranchMergeSummary.DetailsData? details = summary.Details; ArgumentNullException.ThrowIfNull(details); Assert.Equal(1, details.Added); diff --git a/tests/Crowdin.Api.Tests/Bundles/BundleFilesApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundleFilesApiTests.cs similarity index 85% rename from tests/Crowdin.Api.Tests/Bundles/BundleFilesApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundleFilesApiTests.cs index dc46dd54..871005ee 100644 --- a/tests/Crowdin.Api.Tests/Bundles/BundleFilesApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundleFilesApiTests.cs @@ -11,44 +11,43 @@ using Crowdin.Api.Bundles; using Crowdin.Api.Core; using Crowdin.Api.SourceFiles; -using Crowdin.Api.Tests.Core; -namespace Crowdin.Api.Tests.Bundles +namespace Crowdin.Api.UnitTesting.Tests.Bundles { public class BundleFilesApiTests { private const int ProjectId = 2; private const int BundleId = 1; - + [Fact] public async Task ListFiles_AsTranslatorOrProofreader() { var file = await ExecuteForType( - Core.Resources.Bundles.ListBundleFiles_Response_AsTranslator); - + Resources.Bundles.ListBundleFiles_Response_AsTranslator); + Assert.Equal(ProjectId, file.ProjectId); Assert.Equal(FileStatus.Active, file.Status); } - + [Fact] public async Task ListFiles_AsProjectOwnerOrManager() { var file = await ExecuteForType( - Core.Resources.Bundles.ListBundleFiles_Response_AsProjectOwner); - + Resources.Bundles.ListBundleFiles_Response_AsProjectOwner); + Assert.Equal(Priority.Normal, file.Priority); Assert.NotNull(file.ImportOptions); Assert.NotNull(file.ExportOptions); Assert.Equal(3, file.ExcludedTargetLanguages.Length); } - + private static async Task ExecuteForType(string resourceId) where T : FileResourceBase { Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/projects/{ProjectId}/bundles/{BundleId}/files"; IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -56,10 +55,10 @@ private static async Task ExecuteForType(string resourceId) where T : File StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(resourceId) }); - + var executor = new BundlesApiExecutor(mockClient.Object); ResponseList response = await executor.BundleListFiles(ProjectId, BundleId); - + Assert.Single(response.Data); T file = response.Data.First(); return file; diff --git a/tests/Crowdin.Api.Tests/Bundles/BundlesApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesApiTests.cs similarity index 91% rename from tests/Crowdin.Api.Tests/Bundles/BundlesApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesApiTests.cs index 57e247de..88501d82 100644 --- a/tests/Crowdin.Api.Tests/Bundles/BundlesApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesApiTests.cs @@ -1,8 +1,6 @@ - using Crowdin.Api.Bundles; using Crowdin.Api.Core; using Crowdin.Api.SourceFiles; -using Crowdin.Api.Tests.Core; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -12,7 +10,7 @@ using System.Threading.Tasks; using Xunit; -namespace Crowdin.Api.Tests.Bundles +namespace Crowdin.Api.UnitTesting.Tests.Bundles { public class BundlesApiTests { @@ -35,7 +33,7 @@ public async Task ListBundleBranches() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.ListBundleBranches_Response) + JsonObject = JObject.Parse(Resources.Bundles.ListBundleBranches_Response) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -63,7 +61,7 @@ public async Task ListBundles() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.ListBundles_Response) + JsonObject = JObject.Parse(Resources.Bundles.ListBundles_Response) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -102,7 +100,7 @@ public async Task AddBundle() }; string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Bundles.AddBundle_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Bundles.AddBundle_Request); Assert.Equal(expectedRequestJson, actualRequestJson); Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); @@ -114,7 +112,7 @@ public async Task AddBundle() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.CommonResponses_Bundle) + JsonObject = JObject.Parse(Resources.Bundles.CommonResponses_Bundle) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -137,7 +135,7 @@ public async Task GetBundle() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.CommonResponses_Bundle) + JsonObject = JObject.Parse(Resources.Bundles.CommonResponses_Bundle) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -186,7 +184,7 @@ public async Task EditBundle() }; string actualRequestJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Bundles.EditBundle_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Bundles.EditBundle_Request); Assert.Equal(expectedRequestJson, actualRequestJson); Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); @@ -198,7 +196,7 @@ public async Task EditBundle() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.CommonResponses_Bundle) + JsonObject = JObject.Parse(Resources.Bundles.CommonResponses_Bundle) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -222,7 +220,7 @@ public async Task DownloadBundle() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.DownloadBundle_Response) + JsonObject = JObject.Parse(Resources.Bundles.DownloadBundle_Response) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -248,7 +246,7 @@ public async Task ExportBundle() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Accepted, - JsonObject = JObject.Parse(Core.Resources.Bundles.CommonResponses_BundleExport) + JsonObject = JObject.Parse(Resources.Bundles.CommonResponses_BundleExport) }); var executor = new BundlesApiExecutor(mockClient.Object); @@ -272,7 +270,7 @@ public async Task CheckBundleExportStatus() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Bundles.CommonResponses_BundleExport) + JsonObject = JObject.Parse(Resources.Bundles.CommonResponses_BundleExport) }); var executor = new BundlesApiExecutor(mockClient.Object); diff --git a/tests/Crowdin.Api.Tests/Bundles/BundlesSerializationTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesSerializationTests.cs similarity index 93% rename from tests/Crowdin.Api.Tests/Bundles/BundlesSerializationTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesSerializationTests.cs index 92f2c230..ec49e94d 100644 --- a/tests/Crowdin.Api.Tests/Bundles/BundlesSerializationTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Bundles/BundlesSerializationTests.cs @@ -3,9 +3,8 @@ using Xunit; using Crowdin.Api.Bundles; -using Crowdin.Api.Tests.Core; -namespace Crowdin.Api.Tests.Bundles +namespace Crowdin.Api.UnitTesting.Tests.Bundles { public class BundlesSerializationTests { @@ -26,7 +25,7 @@ public void PatchPaths() private static void SerializeAndAssert(BundlePatchPath actualPath, string expectedPathString) { string actualPathString = TestUtils.SerializeValue(actualPath, JsonSettings); - + Assert.Equal(expectedPathString, actualPathString); } } diff --git a/tests/Crowdin.Api.Tests/Clients/ClientsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Clients/ClientsApiTests.cs similarity index 89% rename from tests/Crowdin.Api.Tests/Clients/ClientsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Clients/ClientsApiTests.cs index eb511811..f15f0af9 100644 --- a/tests/Crowdin.Api.Tests/Clients/ClientsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Clients/ClientsApiTests.cs @@ -1,6 +1,5 @@ using Crowdin.Api.Clients; using Crowdin.Api.Core; -using Crowdin.Api.Tests.Core; using Moq; using Newtonsoft.Json.Linq; using System.Collections.Generic; @@ -8,7 +7,7 @@ using System.Threading.Tasks; using Xunit; -namespace Crowdin.Api.Tests.Clients +namespace Crowdin.Api.UnitTesting.Tests.Clients { public class ClientsApiTests { @@ -29,7 +28,7 @@ public async Task ListClients() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Clients.ListClientsResponse) + JsonObject = JObject.Parse(Resources.Clients.ListClientsResponse) }); var executor = new ClientsApiExecutor(mockClient.Object); diff --git a/tests/Crowdin.Api.Tests/Dictionaries/DictionariesApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Dictionaries/DictionariesApiTests.cs similarity index 84% rename from tests/Crowdin.Api.Tests/Dictionaries/DictionariesApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Dictionaries/DictionariesApiTests.cs index 4b22452a..f200e640 100644 --- a/tests/Crowdin.Api.Tests/Dictionaries/DictionariesApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Dictionaries/DictionariesApiTests.cs @@ -2,17 +2,14 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; - using Crowdin.Api.Core; using Crowdin.Api.Dictionaries; -using Crowdin.Api.Tests.Core; - using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Dictionaries +namespace Crowdin.Api.UnitTesting.Tests.Dictionaries { public class DictionariesApiTests { @@ -29,7 +26,7 @@ public async Task ListDictionaries() { { "languageIds", languageIds } }; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); mockClient @@ -37,12 +34,12 @@ public async Task ListDictionaries() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Dictionaries.ListDictionaries) + JsonObject = JObject.Parse(Resources.Dictionaries.ListDictionaries) }); var executor = new DictionariesApiExecutor(mockClient.Object); ResponseList response = await executor.ListDictionaries(projectId, languageIds); - + Assert.NotNull(response); Assert.Single(response.Data); } @@ -67,8 +64,8 @@ public void EditDictionary_Add_PatchesSerialization() }; string actualPatchesListJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string rightPatchesListJson = Core.Resources.Dictionaries.EditDictionary_OpAdd_RightPatchesListJson; - + string rightPatchesListJson = Resources.Dictionaries.EditDictionary_OpAdd_RightPatchesListJson; + Assert.NotEmpty(actualPatchesListJson); Assert.Equal(rightPatchesListJson, actualPatchesListJson); } @@ -86,12 +83,12 @@ public void EditDictionary_Remove_PatchesSerialization_SingleIndex() }; string actualPatchesListJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string rightPatchesListJson = Core.Resources.Dictionaries.EditDictionary_OpRemove_RightPatchesListJson_SingleIndex; - + string rightPatchesListJson = Resources.Dictionaries.EditDictionary_OpRemove_RightPatchesListJson_SingleIndex; + Assert.NotEmpty(actualPatchesListJson); Assert.Equal(rightPatchesListJson, actualPatchesListJson); } - + [Fact] public void EditDictionary_Remove_PatchesSerialization_MultiIndexesWithDuplicates() { @@ -103,10 +100,10 @@ public void EditDictionary_Remove_PatchesSerialization_MultiIndexesWithDuplicate Path = new DictionaryPatchPath(new []{ 0, 1, 2, 0, 3, 3 }) }, }; - + string actualPatchesListJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string rightPatchesListJson = Core.Resources.Dictionaries.EditDictionary_OpRemove_RightPatchesListJson_MultiIndexesWithDuplicates; - + string rightPatchesListJson = Resources.Dictionaries.EditDictionary_OpRemove_RightPatchesListJson_MultiIndexesWithDuplicates; + Assert.NotEmpty(actualPatchesListJson); Assert.Equal(rightPatchesListJson, actualPatchesListJson); } diff --git a/tests/Crowdin.Api.Tests/Distributions/DistributionsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Distributions/DistributionsApiTests.cs similarity index 87% rename from tests/Crowdin.Api.Tests/Distributions/DistributionsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Distributions/DistributionsApiTests.cs index 57e76c22..8c35e226 100644 --- a/tests/Crowdin.Api.Tests/Distributions/DistributionsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Distributions/DistributionsApiTests.cs @@ -1,17 +1,14 @@ using System.Net; using System.Threading.Tasks; - using Crowdin.Api.Core; using Crowdin.Api.Distributions; -using Crowdin.Api.Tests.Core; - using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Distributions +namespace Crowdin.Api.UnitTesting.Tests.Distributions { public class DistributionsApiTests { @@ -31,7 +28,7 @@ public async Task AddDistribution() }; string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Distributions.AddDistribution_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Distributions.AddDistribution_Request); Assert.Equal(expectedRequestJson, actualRequestJson); var url = $"/projects/{projectId}/distributions"; @@ -42,7 +39,7 @@ public async Task AddDistribution() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Created, - JsonObject = JObject.Parse(Core.Resources.Distributions.AddDistribution_Response) + JsonObject = JObject.Parse(Resources.Distributions.AddDistribution_Response) }); var executor = new DistributionsApiExecutor(mockClient.Object); @@ -66,7 +63,7 @@ public async Task AddDistributionStringBased() }; string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Distributions.AddDistributionStringBased_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Distributions.AddDistributionStringBased_Request); Assert.Equal(expectedRequestJson, actualRequestJson); var url = $"/projects/{projectId}/distributions"; @@ -77,7 +74,7 @@ public async Task AddDistributionStringBased() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Created, - JsonObject = JObject.Parse(Core.Resources.Distributions.AddDistributionStringBased_Response) + JsonObject = JObject.Parse(Resources.Distributions.AddDistributionStringBased_Response) }); var executor = new DistributionsApiExecutor(mockClient.Object); @@ -120,18 +117,18 @@ public async Task EditDistribution() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Distributions.EditDistribution_Response) + JsonObject = JObject.Parse(Resources.Distributions.EditDistribution_Response) }); var executor = new DistributionsApiExecutor(mockClient.Object); Distribution response = await executor.EditDistribution(projectId, hash, patches); - + Assert.NotNull(response); Assert.Equal(newName, response.Name); Assert.Contains(newBundleIds[0], response.BundleIds); Assert.Contains(newBundleIds[1], response.BundleIds); } - + [Fact] public void EditDistribution_RequestSerialization() { @@ -162,10 +159,10 @@ public void EditDistribution_RequestSerialization() Value = new[] { 123, 456 } } }; - + string actualRequestJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Distributions.EditDistribution_Request_AllPaths); - + string expectedRequestJson = TestUtils.CompactJson(Resources.Distributions.EditDistribution_Request_AllPaths); + Assert.Equal(expectedRequestJson, actualRequestJson); } } diff --git a/tests/Crowdin.Api.Tests/Common/EmptyArrayAsObjectTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/EmptyArrayAsObjectTests.cs similarity index 88% rename from tests/Crowdin.Api.Tests/Common/EmptyArrayAsObjectTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/EmptyArrayAsObjectTests.cs index b3eeba8b..5c639c35 100644 --- a/tests/Crowdin.Api.Tests/Common/EmptyArrayAsObjectTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/EmptyArrayAsObjectTests.cs @@ -1,15 +1,14 @@ - + using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; using Crowdin.Api.Core; using Crowdin.Api.ProjectsGroups; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; using Crowdin.Api.Webhooks.Organization; -namespace Crowdin.Api.Tests.Common +namespace Crowdin.Api.UnitTesting.Tests { public class EmptyArrayAsObjectTests { @@ -22,20 +21,20 @@ public void OrganizationWebhookResource() var parser = new JsonParser(JsonSettings); var obj = parser.ParseResponseObject(JObject.Parse(actualResponseJson)); - + Assert.NotNull(obj); Assert.NotNull(obj.Headers); Assert.Empty(obj.Headers); } - + [Fact] public void ProjectSettings() { string actualResponseJson = Core_BugCases.Response_ProjectSettings_TmPenalties; - + var parser = new JsonParser(JsonSettings); var response = parser.ParseResponseObject(JObject.Parse(actualResponseJson)); - + Assert.NotNull(response); Assert.NotNull(response.TmPenalties); } diff --git a/tests/Crowdin.Api.Tests/Common/EnumSerializationTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/EnumSerializationTests.cs similarity index 92% rename from tests/Crowdin.Api.Tests/Common/EnumSerializationTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/EnumSerializationTests.cs index 3f1b8ba5..38723747 100644 --- a/tests/Crowdin.Api.Tests/Common/EnumSerializationTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/EnumSerializationTests.cs @@ -1,15 +1,12 @@  using System; - using Crowdin.Api.Distributions; using Crowdin.Api.Reports; using Crowdin.Api.Tasks; -using Crowdin.Api.Tests.Core; - using Newtonsoft.Json; using Xunit; -namespace Crowdin.Api.Tests.Common +namespace Crowdin.Api.UnitTesting.Tests { public class EnumSerializationTests { @@ -42,7 +39,7 @@ public void NumericEnums() { var enumValue = TaskType.Proofread; string serializedEnumValue = JsonConvert.SerializeObject(enumValue, DefaultSettings); - Assert.Equal((int) enumValue, Convert.ToInt32(serializedEnumValue)); + Assert.Equal((int)enumValue, Convert.ToInt32(serializedEnumValue)); var deserializedEnumValue = JsonConvert.DeserializeObject(serializedEnumValue, DefaultSettings); Assert.Equal(enumValue, deserializedEnumValue); diff --git a/tests/Crowdin.Api.Tests/Common/ErrorDeserializationTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/ErrorDeserializationTests.cs similarity index 93% rename from tests/Crowdin.Api.Tests/Common/ErrorDeserializationTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/ErrorDeserializationTests.cs index 32275be5..9f2cec22 100644 --- a/tests/Crowdin.Api.Tests/Common/ErrorDeserializationTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/ErrorDeserializationTests.cs @@ -7,9 +7,9 @@ using System.Threading.Tasks; using Xunit; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.Common +namespace Crowdin.Api.UnitTesting.Tests { public class ErrorDeserializationTests { @@ -51,9 +51,9 @@ await Assert.ThrowsAsync(() => CrowdinApiClient.CheckDefaultPreconditionsAndErrors(response)); Assert.Equal("Method Not Allowed", exception.Message); - Assert.Equal((int) HttpStatusCode.MethodNotAllowed, exception.Code); + Assert.Equal((int)HttpStatusCode.MethodNotAllowed, exception.Code); } - + private static HttpResponseMessage CreateResponseMessage(HttpStatusCode statusCode, string jsonString) { return new HttpResponseMessage diff --git a/tests/Crowdin.Api.Tests/Common/ExponentialBackoffRateLimiterTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/ExponentialBackoffRateLimiterTests.cs similarity index 92% rename from tests/Crowdin.Api.Tests/Common/ExponentialBackoffRateLimiterTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/ExponentialBackoffRateLimiterTests.cs index fa91411d..f2270725 100644 --- a/tests/Crowdin.Api.Tests/Common/ExponentialBackoffRateLimiterTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/ExponentialBackoffRateLimiterTests.cs @@ -9,7 +9,7 @@ using Crowdin.Api.Core.RateLimiting; -namespace Crowdin.Api.Tests.Common +namespace Crowdin.Api.UnitTesting.Tests { public class ExponentialBackoffRateLimiterTests { @@ -24,22 +24,22 @@ public ExponentialBackoffRateLimiterTests(ITestOutputHelper testOutputHelper) MaxDelay = TimeSpan.FromSeconds(5), InitialDelay = TimeSpan.FromMilliseconds(100) }); - + _testOutputHelper = testOutputHelper; } - + [Fact] public async Task SingleSuccessRequest() { var codes = new[] { HttpStatusCode.OK }; - + await RunFakeRequestsAndAssert(codes, expectedAttemptsCount: 1); } [Fact] public async Task OneRateLimitErrorOccurred() { - var codes = new[] { (HttpStatusCode) 429, HttpStatusCode.OK }; + var codes = new[] { (HttpStatusCode)429, HttpStatusCode.OK }; await RunFakeRequestsAndAssert(codes, expectedAttemptsCount: 2); } @@ -62,16 +62,16 @@ public async Task MultiRateLimitErrorOccurred() private async Task RunFakeRequestsAndAssert(HttpStatusCode[] attemptResults, int expectedAttemptsCount) { var actualAttemptsCount = 0; - + HttpResponseMessage? theLastResponse = await _rateLimiter.ExecuteRequest(async requestId => { _testOutputHelper.WriteLine("Executing request №{0}", requestId); actualAttemptsCount++; - + return await CreateResponseMessage(attemptResults[requestId - 1]); }); - + Assert.Equal(HttpStatusCode.OK, theLastResponse.StatusCode); Assert.Equal(expectedAttemptsCount, actualAttemptsCount); } diff --git a/tests/Crowdin.Api.Tests/Common/FetchAllDataTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/FetchAllDataTests.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Common/FetchAllDataTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/FetchAllDataTests.cs index 217829d3..2ac60ab2 100644 --- a/tests/Crowdin.Api.Tests/Common/FetchAllDataTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/FetchAllDataTests.cs @@ -4,12 +4,12 @@ using System.Threading.Tasks; using Xunit; -namespace Crowdin.Api.Tests.Common +namespace Crowdin.Api.UnitTesting.Tests { public class FetchAllDataTests { private static readonly int[] ArrayOfNumbers; - + static FetchAllDataTests() { var i = 0; @@ -48,7 +48,7 @@ public async Task MaxAmountOfItems_RequestsCount_1() await RunRequestsAndCheckCountOrThrow(expectedExecutionsCount, maxAmountOfItems: expectedItemsCount); } - + [Fact] public async Task MaxAmountOfItems_RequestsCount_2() { @@ -57,7 +57,7 @@ public async Task MaxAmountOfItems_RequestsCount_2() await RunRequestsAndCheckCountOrThrow(expectedExecutionsCount, maxAmountOfItems: expectedItemsCount); } - + [Fact] public async Task MaxAmountOfItems_RequestsCount_50() { @@ -77,24 +77,24 @@ private static async Task RunRequestsAndCheckCountOrThrow( maxAmountOfItems < ArrayOfNumbers.Length ? ArrayOfNumbers.Take(maxAmountOfItems.Value).ToArray() : ArrayOfNumbers; - + var executionsCounter = 0; - + int[] actualArray = await CrowdinApiClient.WithFetchAll((limit, offset) => { executionsCounter++; - + if (executionsCounter > executionsCountLimit) { throw new Exception("No subsequent requests allowed"); } - + return Task.FromResult(new ResponseList { Data = ArrayOfNumbers.Skip(offset).Take(limit).ToList() }); }, maxAmountOfItems, amountPerRequest); - + Assert.Equal(expectedArray.Length, actualArray.Length); Assert.Equal(expectedArray, actualArray); } diff --git a/tests/Crowdin.Api.Tests/Fields/FieldsApiTest.cs b/tests/Crowdin.Api.UnitTesting/Tests/Fields/FieldsApiTest.cs similarity index 92% rename from tests/Crowdin.Api.Tests/Fields/FieldsApiTest.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Fields/FieldsApiTest.cs index e1de3aea..3f77d80c 100644 --- a/tests/Crowdin.Api.Tests/Fields/FieldsApiTest.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Fields/FieldsApiTest.cs @@ -3,18 +3,17 @@ using System.Threading.Tasks; using Crowdin.Api.Core; using Crowdin.Api.Fields; -using Crowdin.Api.Tests.Core; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Fields; +namespace Crowdin.Api.UnitTesting.Tests.Fields; public class FieldsApiTest { private static readonly JsonSerializerSettings DefaultSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task ListFields() { @@ -30,7 +29,7 @@ public async Task ListFields() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Fields.ListFields_Response) + JsonObject = JObject.Parse(Resources.Fields.ListFields_Response) }); var executor = new FieldsApiExecutor(mockClient.Object); @@ -38,7 +37,7 @@ public async Task ListFields() Assert.NotNull(response); Assert.Equal(2, response.Data.Count); - + var field = response.Data[0]; Assert.Equal("Custom field", field.Name); Assert.Equal(FieldType.Select, field.Type); @@ -47,7 +46,7 @@ public async Task ListFields() ListFieldConfig listFieldConfig = (ListFieldConfig)field.Config; Assert.Equal("string", listFieldConfig.Options[0].Label); Assert.Equal(Place.ProjectCreateModal, listFieldConfig.Locations[0].Place); - + field = response.Data[1]; Assert.Equal("Client company", field.Name); Assert.Equal(FieldType.Select, field.Type); @@ -91,7 +90,7 @@ public async Task AddField() }; string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); - string expectedResultJson = TestUtils.CompactJson(Core.Resources.Fields.AddField_Request); + string expectedResultJson = TestUtils.CompactJson(Resources.Fields.AddField_Request); Assert.Equal(expectedResultJson, actualRequestJson); Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); @@ -101,12 +100,12 @@ public async Task AddField() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.Created, - JsonObject = JObject.Parse(Core.Resources.Fields.AddAndGetField_Response) + JsonObject = JObject.Parse(Resources.Fields.AddAndGetField_Response) }); var executor = new FieldsApiExecutor(mockClient.Object); Field? response = await executor.AddField(request); - + Assert_AddAndGetField(response); } @@ -123,12 +122,12 @@ public async Task GetField() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Fields.AddAndGetField_Response) + JsonObject = JObject.Parse(Resources.Fields.AddAndGetField_Response) }); var executor = new FieldsApiExecutor(mockClient.Object); Field? response = await executor.GetField(fieldId); - + Assert_AddAndGetField(response); } @@ -197,7 +196,7 @@ public async Task EditField() }; string actualRequestJSon = JsonConvert.SerializeObject(patches, DefaultSettings); - string expectedRequestJSon = TestUtils.CompactJson(Core.Resources.Fields.EditField_Request, DefaultSettings); + string expectedRequestJSon = TestUtils.CompactJson(Resources.Fields.EditField_Request, DefaultSettings); Assert.Equal(expectedRequestJSon, actualRequestJSon); Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); @@ -207,12 +206,12 @@ public async Task EditField() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Fields.EditField_Response) + JsonObject = JObject.Parse(Resources.Fields.EditField_Response) }); var executor = new FieldsApiExecutor(mockClient.Object); Field? response = await executor.EditField(fieldId, patches); - + Assert.Equal("UpdateClientCompanyName", response.Name); Assert.IsType(response.Config); ListFieldConfig listFieldConfig = (ListFieldConfig)response.Config; @@ -236,5 +235,5 @@ private static void Assert_AddAndGetField(Field response) Assert.Equal("str", listFieldConfig.Options[0].Value); Assert.Equal(Place.ProjectCreateModal, listFieldConfig.Locations[0].Place); } - + } \ No newline at end of file diff --git a/tests/Crowdin.Api.Tests/Glossaries/ConceptsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/ConceptsApiTests.cs similarity index 94% rename from tests/Crowdin.Api.Tests/Glossaries/ConceptsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Glossaries/ConceptsApiTests.cs index dcbc4db8..d7a0eff5 100644 --- a/tests/Crowdin.Api.Tests/Glossaries/ConceptsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/ConceptsApiTests.cs @@ -11,10 +11,9 @@ using Crowdin.Api.Core; using Crowdin.Api.Glossaries; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; +using Crowdin.Api.UnitTesting.Resources; -namespace Crowdin.Api.Tests.Glossaries +namespace Crowdin.Api.UnitTesting.Tests.Glossaries { public class ConceptsApiTests { @@ -24,14 +23,14 @@ public class ConceptsApiTests public async Task ListConcepts() { const int glossaryId = 6; - + IDictionary queryParams = TestUtils.CreateQueryParamsFromPaging(); queryParams.Add("orderBy", "createdAt desc"); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); - + var url = $"/glossaries/{glossaryId}/concepts"; - + mockClient .Setup(client => client.SendGetRequest(url, queryParams)) .ReturnsAsync(new CrowdinApiResult @@ -39,11 +38,11 @@ public async Task ListConcepts() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(Glossaries_Concepts.ListConcepts_Response) }); - + var executor = new GlossariesApiExecutor(mockClient.Object); ResponseList response = await executor.ListConcepts( glossaryId, - orderBy: new [] + orderBy: new[] { new SortingRule { @@ -51,7 +50,7 @@ public async Task ListConcepts() Order = SortingOrder.Descending } }); - + Assert.NotNull(response); Assert.Single(response.Data); Assert.Equal(glossaryId, response.Data[0].GlossaryId); @@ -74,14 +73,14 @@ public async Task GetConcept() StatusCode = HttpStatusCode.OK, JsonObject = JObject.Parse(Glossaries_Concepts.GetConcept_Response) }); - + var executor = new GlossariesApiExecutor(mockClient.Object); Concept response = await executor.GetConcept(glossaryId, conceptId); - + Assert.NotNull(response); Assert.Equal(conceptId, response.Id); Assert.Equal(glossaryId, response.GlossaryId); - + Assert.NotNull(response.LanguagesDetails); Assert.Single(response.LanguagesDetails); Assert.Equal(DateTimeOffset.Parse("2019-09-19T14:14:00+00:00"), response.LanguagesDetails[0].CreatedAt); @@ -114,7 +113,7 @@ public async Task UpdateConcept() string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); string expectedRequestJson = TestUtils.CompactJson(Glossaries_Concepts.UpdateConcept_Request); Assert.Equal(expectedRequestJson, actualRequestJson); - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/glossaries/{glossaryId}/concepts/{conceptId}"; @@ -129,7 +128,7 @@ public async Task UpdateConcept() var executor = new GlossariesApiExecutor(mockClient.Object); Concept response = await executor.UpdateConcept(glossaryId, conceptId, request); - + Assert.NotNull(response); } } diff --git a/tests/Crowdin.Api.Tests/Glossaries/GlossariesApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/GlossariesApiTests.cs similarity index 90% rename from tests/Crowdin.Api.Tests/Glossaries/GlossariesApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Glossaries/GlossariesApiTests.cs index a6898164..21a79e4d 100644 --- a/tests/Crowdin.Api.Tests/Glossaries/GlossariesApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/GlossariesApiTests.cs @@ -4,22 +4,19 @@ using System.Linq; using System.Net; using System.Threading.Tasks; - using Crowdin.Api.Core; using Crowdin.Api.Glossaries; -using Crowdin.Api.Tests.Core; - using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Glossaries +namespace Crowdin.Api.UnitTesting.Tests.Glossaries { public class GlossariesApiTests { private static readonly JsonSerializerSettings DefaultSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task ListGlossaries() { @@ -36,20 +33,20 @@ public async Task ListGlossaries() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Glossaries.ListGlossaries_Response) + JsonObject = JObject.Parse(Resources.Glossaries.ListGlossaries_Response) }); var executor = new GlossariesApiExecutor(mockClient.Object); ResponseList response = await executor.ListGlossaries( groupId: groupId, - orderBy: new [] + orderBy: new[] { new SortingRule { Field = "createdAt" } }); - + Assert.NotNull(response); Assert.Single(response.Data); Assert.Equal(groupId, response.Data[0].GroupId); @@ -80,7 +77,7 @@ public async Task EditGlossary() }; string actualRequestJson = JsonConvert.SerializeObject(patches, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Glossaries.EditGlossary_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Glossaries.EditGlossary_Request); Assert.Equal(expectedRequestJson, actualRequestJson); var url = $"/glossaries/{glossaryId}"; @@ -92,12 +89,12 @@ public async Task EditGlossary() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Glossaries.EditGlossary_Response) + JsonObject = JObject.Parse(Resources.Glossaries.EditGlossary_Response) }); var executor = new GlossariesApiExecutor(mockClient.Object); Glossary response = await executor.EditGlossary(glossaryId, patches); - + Assert.NotNull(response); Assert.Equal(newName, response.Name); Assert.Equal(newLanguageId, response.LanguageId); @@ -116,7 +113,7 @@ public async Task ConcordanceSearch() }; string actualRequestJson = JsonConvert.SerializeObject(request, DefaultSettings); - string expectedRequestJson = TestUtils.CompactJson(Core.Resources.Glossaries.ConcordanceSearch_Request); + string expectedRequestJson = TestUtils.CompactJson(Resources.Glossaries.ConcordanceSearch_Request); Assert.Equal(expectedRequestJson, actualRequestJson); Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); @@ -128,12 +125,12 @@ public async Task ConcordanceSearch() .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Glossaries.ConcordanceSearch_Response) + JsonObject = JObject.Parse(Resources.Glossaries.ConcordanceSearch_Response) }); var executor = new GlossariesApiExecutor(mockClient.Object); ResponseList response = await executor.ConcordanceSearch(projectId, request); - + Assert.NotNull(response); GlossaryConcordanceResultResource? resource = response.Data?.Single(); @@ -151,16 +148,16 @@ public async Task ConcordanceSearch() Assert.NotNull(concept); Assert.Equal(2, concept.Id); Assert.Equal("general", concept.Subject); - + ConceptLanguageDetails? languagesDetails = concept.LanguagesDetails?.Single(); Assert.NotNull(languagesDetails); Assert.Equal("en", languagesDetails!.LanguageId); Assert.Equal(DateTimeOffset.Parse("2019-09-19T14:14:00+00:00"), languagesDetails.CreatedAt); Assert.Equal(DateTimeOffset.Parse("2019-09-19T14:14:00+00:00"), languagesDetails.UpdatedAt); - + Assert.Equal(DateTimeOffset.Parse("2019-09-23T07:19:47+00:00"), concept.CreatedAt); Assert.Equal(DateTimeOffset.Parse("2019-09-23T07:19:47+00:00"), concept.CreatedAt); - + Assert_Term(resource.SourceTerms?.Single()); Assert_Term(resource.TargetTerms?.Single()); } diff --git a/tests/Crowdin.Api.Tests/Glossaries/TermsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/TermsApiTests.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Glossaries/TermsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Glossaries/TermsApiTests.cs index f0d841e9..c84ec11f 100644 --- a/tests/Crowdin.Api.Tests/Glossaries/TermsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Glossaries/TermsApiTests.cs @@ -1,23 +1,20 @@  using System.Net; using System.Threading.Tasks; - using Crowdin.Api.Core; using Crowdin.Api.Glossaries; -using Crowdin.Api.Tests.Core; -using Crowdin.Api.Tests.Core.Resources; - +using Crowdin.Api.UnitTesting.Resources; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Glossaries +namespace Crowdin.Api.UnitTesting.Tests.Glossaries { public class TermsApiTests { private static readonly JsonSerializerSettings DefaultSettings = TestUtils.CreateJsonSerializerOptions(); - + [Fact] public async Task AddTerm() { @@ -48,7 +45,7 @@ public async Task AddTerm() var executor = new GlossariesApiExecutor(mockClient.Object); Term response = await executor.AddTerm(glossaryId, request); - + Assert.NotNull(response); Assert.Equal(request.Text, response.Text); Assert.Equal(request.Description, response.Description); @@ -101,7 +98,7 @@ public async Task EditTerm() var executor = new GlossariesApiExecutor(mockClient.Object); Term response = await executor.EditTerm(glossaryId, termId, patches); - + Assert.NotNull(response); Assert.Equal(glossaryId, response.GlossaryId); Assert.Equal(newPartOfSpeech, response.PartOfSpeech); diff --git a/tests/Crowdin.Api.Tests/Core/InternalExtensionsTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/InternalExtensionsTests.cs similarity index 96% rename from tests/Crowdin.Api.Tests/Core/InternalExtensionsTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/InternalExtensionsTests.cs index c978ac68..e754e3e6 100644 --- a/tests/Crowdin.Api.Tests/Core/InternalExtensionsTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/InternalExtensionsTests.cs @@ -1,12 +1,10 @@ using System.Collections.Generic; - using Crowdin.Api.Core; - using Moq; using Xunit; -namespace Crowdin.Api.Tests.Core +namespace Crowdin.Api.UnitTesting.Tests { public class InternalExtensionsTests { @@ -30,7 +28,7 @@ public void AddParamIfPresentInt() var queryParams = new Dictionary(); queryParams.AddParamIfPresent("param", 1); - queryParams.AddParamIfPresent("other", (int?) null); + queryParams.AddParamIfPresent("other", (int?)null); Assert.Single(queryParams.Keys); Assert.True(queryParams.TryGetValue("param", out string? value)); @@ -43,7 +41,7 @@ public void AddParamIfPresentLong() var queryParams = new Dictionary(); queryParams.AddParamIfPresent("param", 1L); - queryParams.AddParamIfPresent("other", (long?) null); + queryParams.AddParamIfPresent("other", (long?)null); Assert.Single(queryParams.Keys); Assert.True(queryParams.TryGetValue("param", out string? value)); @@ -56,7 +54,7 @@ public void AddParamIfPresentBool() var queryParams = new Dictionary(); queryParams.AddParamIfPresent("param", true); - queryParams.AddParamIfPresent("other", (bool?) null); + queryParams.AddParamIfPresent("other", (bool?)null); Assert.Single(queryParams.Keys); Assert.True(queryParams.TryGetValue("param", out string? value)); @@ -154,7 +152,7 @@ public void AddParamListIfPresentObject() mockObject2.Object, mockObject3.Object }); - queryParams.AddParamIfPresent("other1", new object[] {}); + queryParams.AddParamIfPresent("other1", new object[] { }); queryParams.AddParamIfPresent("other2", null as object[]); Assert.Single(queryParams.Keys); @@ -167,8 +165,8 @@ public void AddParamListIfPresentString() { var queryParams = new Dictionary(); - queryParams.AddParamIfPresent("param", new string[] {"test1", "test2", "test3"}); - queryParams.AddParamIfPresent("other1", new string[] {}); + queryParams.AddParamIfPresent("param", new string[] { "test1", "test2", "test3" }); + queryParams.AddParamIfPresent("other1", new string[] { }); queryParams.AddParamIfPresent("other2", null as string[]); Assert.Single(queryParams.Keys); diff --git a/tests/Crowdin.Api.Tests/Labels/LabelsApiTests.cs b/tests/Crowdin.Api.UnitTesting/Tests/Labels/LabelsApiTests.cs similarity index 87% rename from tests/Crowdin.Api.Tests/Labels/LabelsApiTests.cs rename to tests/Crowdin.Api.UnitTesting/Tests/Labels/LabelsApiTests.cs index eed1f6a1..764b80de 100644 --- a/tests/Crowdin.Api.Tests/Labels/LabelsApiTests.cs +++ b/tests/Crowdin.Api.UnitTesting/Tests/Labels/LabelsApiTests.cs @@ -4,24 +4,21 @@ using System.Linq; using System.Net; using System.Threading.Tasks; - using Crowdin.Api.Core; using Crowdin.Api.Labels; using Crowdin.Api.Screenshots; using Crowdin.Api.SourceStrings; -using Crowdin.Api.Tests.Core; - using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -namespace Crowdin.Api.Tests.Labels +namespace Crowdin.Api.UnitTesting.Tests.Labels { public class LabelsApiTests { private static readonly JsonSerializerSettings DefaultSettings = TestUtils.CreateJsonSerializerOptions(); - + [Theory] [InlineData(null)] [InlineData(true)] @@ -29,7 +26,7 @@ public class LabelsApiTests public async Task ListLabels(bool? isSystem) { const int projectId = 1; - + Mock mockClient = TestUtils.CreateMockClientWithDefaultParser(); var url = $"/projects/{projectId}/labels"; @@ -46,19 +43,19 @@ public async Task ListLabels(bool? isSystem) .ReturnsAsync(new CrowdinApiResult { StatusCode = HttpStatusCode.OK, - JsonObject = JObject.Parse(Core.Resources.Labels.ListLabels_Response) + JsonObject = JObject.Parse(Resources.Labels.ListLabels_Response) }); - + var executor = new LabelsApiExecutor(mockClient.Object); ResponseList