From c11a1b7be5d41bb1825a7190c708fdb04923a4fd Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 27 Oct 2019 22:52:21 +0800 Subject: Add error code tests. --- Timeline/Resources/Filters.Designer.cs | 90 +++++++++++++++ Timeline/Resources/Filters.resx | 129 ++++++++++++++++++++++ Timeline/Resources/Filters.zh.resx | 129 ++++++++++++++++++++++ Timeline/Resources/Models/Http/Common.Designer.cs | 31 +----- Timeline/Resources/Models/Http/Common.resx | 11 +- Timeline/Resources/Models/Http/Common.zh.resx | 13 +-- 6 files changed, 353 insertions(+), 50 deletions(-) create mode 100644 Timeline/Resources/Filters.Designer.cs create mode 100644 Timeline/Resources/Filters.resx create mode 100644 Timeline/Resources/Filters.zh.resx (limited to 'Timeline/Resources') diff --git a/Timeline/Resources/Filters.Designer.cs b/Timeline/Resources/Filters.Designer.cs new file mode 100644 index 00000000..ae3565f7 --- /dev/null +++ b/Timeline/Resources/Filters.Designer.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// 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 Timeline.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", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Filters { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Filters() { + } + + /// + /// 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("Timeline.Resources.Filters", typeof(Filters).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 Header Content-Length is missing or of bad format.. + /// + internal static string MessageHeaderContentLengthMissing { + get { + return ResourceManager.GetString("MessageHeaderContentLengthMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header Content-Length must not be 0.. + /// + internal static string MessageHeaderContentLengthZero { + get { + return ResourceManager.GetString("MessageHeaderContentLengthZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header Content-Type is required.. + /// + internal static string MessageHeaderContentTypeMissing { + get { + return ResourceManager.GetString("MessageHeaderContentTypeMissing", resourceCulture); + } + } + } +} diff --git a/Timeline/Resources/Filters.resx b/Timeline/Resources/Filters.resx new file mode 100644 index 00000000..d2b7e68a --- /dev/null +++ b/Timeline/Resources/Filters.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Header Content-Length is missing or of bad format. + + + Header Content-Length must not be 0. + + + Header Content-Type is required. + + \ No newline at end of file diff --git a/Timeline/Resources/Filters.zh.resx b/Timeline/Resources/Filters.zh.resx new file mode 100644 index 00000000..90e97e49 --- /dev/null +++ b/Timeline/Resources/Filters.zh.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 请求头Content-Length缺失或者格式不对。 + + + 请求头Content-Length不能为0。 + + + 缺少必需的请求头Content-Type。 + + \ No newline at end of file diff --git a/Timeline/Resources/Models/Http/Common.Designer.cs b/Timeline/Resources/Models/Http/Common.Designer.cs index 2df1e447..4eebd2bc 100644 --- a/Timeline/Resources/Models/Http/Common.Designer.cs +++ b/Timeline/Resources/Models/Http/Common.Designer.cs @@ -108,36 +108,9 @@ namespace Timeline.Resources.Models.Http { /// /// Looks up a localized string similar to Header If-Non-Match is of bad format.. /// - internal static string MessageHeaderBadIfNonMatch { + internal static string MessageHeaderIfNonMatchBad { get { - return ResourceManager.GetString("MessageHeaderBadIfNonMatch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Header Content-Length is missing or of bad format.. - /// - internal static string MessageHeaderMissingContentLength { - get { - return ResourceManager.GetString("MessageHeaderMissingContentLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Header Content-Type is required.. - /// - internal static string MessageHeaderMissingContentType { - get { - return ResourceManager.GetString("MessageHeaderMissingContentType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Header Content-Length must not be 0.. - /// - internal static string MessageHeaderZeroContentLength { - get { - return ResourceManager.GetString("MessageHeaderZeroContentLength", resourceCulture); + return ResourceManager.GetString("MessageHeaderIfNonMatchBad", resourceCulture); } } diff --git a/Timeline/Resources/Models/Http/Common.resx b/Timeline/Resources/Models/Http/Common.resx index 433c341c..540c6c58 100644 --- a/Timeline/Resources/Models/Http/Common.resx +++ b/Timeline/Resources/Models/Http/Common.resx @@ -132,18 +132,9 @@ The item does not exist, so nothing is changed. - + Header If-Non-Match is of bad format. - - Header Content-Length is missing or of bad format. - - - Header Content-Type is required. - - - Header Content-Length must not be 0. - A new item is created. diff --git a/Timeline/Resources/Models/Http/Common.zh.resx b/Timeline/Resources/Models/Http/Common.zh.resx index cbdd6fb9..467916a2 100644 --- a/Timeline/Resources/Models/Http/Common.zh.resx +++ b/Timeline/Resources/Models/Http/Common.zh.resx @@ -132,17 +132,8 @@ 要删除的项目不存在,什么都没有修改。 - - 头If-Non-Match格式不对。 - - - 头Content-Length缺失或者格式不对。 - - - 缺少必需的头Content-Type。 - - - 头Content-Length不能为0。 + + 请求头If-Non-Match格式不对。 创建了一个新项目。 -- cgit v1.2.3