diff options
author | Tanay Parikh <TanayParikh@users.noreply.github.com> | 2022-11-10 20:36:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 20:36:23 +0300 |
commit | 30a917145bac4f6e9dafffe10bcd563f7c861bc4 (patch) | |
tree | a727432c91db18a054a1cb6a188ebb66e33cb9a3 | |
parent | 7840ed54995f6d84abf9ddbe63744fa8039dbfef (diff) |
Fix `Excepted` -> `Expected` typos in repo (#44989)
9 files changed, 43 insertions, 43 deletions
diff --git a/src/Http/Http.Extensions/test/HttpRequestJsonExtensionsTests.cs b/src/Http/Http.Extensions/test/HttpRequestJsonExtensionsTests.cs index 307924b8d4..9ac9ddd2a6 100644 --- a/src/Http/Http.Extensions/test/HttpRequestJsonExtensionsTests.cs +++ b/src/Http/Http.Extensions/test/HttpRequestJsonExtensionsTests.cs @@ -21,8 +21,8 @@ public class HttpRequestJsonExtensionsTests var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await context.Request.ReadFromJsonAsync<int>()); // Assert - var exceptedMessage = $"Unable to read the request as JSON because the request content type 'text/json' is not a known JSON content type."; - Assert.Equal(exceptedMessage, ex.Message); + var expectedMessage = $"Unable to read the request as JSON because the request content type 'text/json' is not a known JSON content type."; + Assert.Equal(expectedMessage, ex.Message); } [Fact] @@ -36,8 +36,8 @@ public class HttpRequestJsonExtensionsTests var ex = await Assert.ThrowsAsync<JsonException>(async () => await context.Request.ReadFromJsonAsync<int>()); // Assert - var exceptedMessage = $"The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."; - Assert.Equal(exceptedMessage, ex.Message); + var expectedMessage = $"The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."; + Assert.Equal(expectedMessage, ex.Message); } [Fact] diff --git a/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSObjectReferenceJsonWorker.cs b/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSObjectReferenceJsonWorker.cs index d0ecba334e..9919a1e184 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSObjectReferenceJsonWorker.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSObjectReferenceJsonWorker.cs @@ -35,12 +35,12 @@ public static class JSObjectReferenceJsonWorker } else { - throw new JsonException($"Unexcepted JSON property {reader.GetString()}."); + throw new JsonException($"Unexpected JSON property {reader.GetString()}."); } } else { - throw new JsonException($"Unexcepted JSON token {reader.TokenType}"); + throw new JsonException($"Unexpected JSON token {reader.TokenType}"); } } diff --git a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/JSStreamReferenceJsonConverter.cs b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/JSStreamReferenceJsonConverter.cs index 48dbe6bd69..79b22dda51 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/JSStreamReferenceJsonConverter.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/JSStreamReferenceJsonConverter.cs @@ -42,12 +42,12 @@ internal sealed class JSStreamReferenceJsonConverter : JsonConverter<IJSStreamRe } else { - throw new JsonException($"Unexcepted JSON property {reader.GetString()}."); + throw new JsonException($"Unexpected JSON property {reader.GetString()}."); } } else { - throw new JsonException($"Unexcepted JSON token {reader.TokenType}"); + throw new JsonException($"Unexpected JSON token {reader.TokenType}"); } } diff --git a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSObjectReferenceJsonConverterTest.cs b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSObjectReferenceJsonConverterTest.cs index 2f170824d3..ea82e11f00 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSObjectReferenceJsonConverterTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSObjectReferenceJsonConverterTest.cs @@ -36,7 +36,7 @@ public class JSObjectReferenceJsonConverterTest // Act & Assert var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); - Assert.Equal("Unexcepted JSON property foo.", ex.Message); + Assert.Equal("Unexpected JSON property foo.", ex.Message); } [Fact] diff --git a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSStreamReferenceJsonConverterTest.cs b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSStreamReferenceJsonConverterTest.cs index 2b2c1f5620..5d6ca5c606 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSStreamReferenceJsonConverterTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSStreamReferenceJsonConverterTest.cs @@ -36,7 +36,7 @@ public class JSStreamReferenceJsonConverterTest // Act & Assert var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); - Assert.Equal("Unexcepted JSON property foo.", ex.Message); + Assert.Equal("Unexpected JSON property foo.", ex.Message); } [Fact] diff --git a/src/Mvc/Mvc.Core/src/Resources.resx b/src/Mvc/Mvc.Core/src/Resources.resx index 3427c5ab3f..6908f9047b 100644 --- a/src/Mvc/Mvc.Core/src/Resources.resx +++ b/src/Mvc/Mvc.Core/src/Resources.resx @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - + <!-- + Microsoft ResX Schema + Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes associated with the data types. - + Example: - + ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> @@ -26,36 +26,36 @@ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> - - There are any number of "resheader" rows that contain simple + + There are any number of "resheader" rows that contain simple name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. - + mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> @@ -481,7 +481,7 @@ <value>'{0}' reached the configured maximum size of the buffer when enumerating a value of type '{1}'. This limit is in place to prevent infinite streams of 'IAsyncEnumerable<>' from continuing indefinitely. If this is not a programming mistake, consider ways to reduce the collection size, or consider manually converting '{1}' into a list rather than increasing the limit.</value> </data> <data name="UnexpectedJsonEnd" xml:space="preserve"> - <value>Unexcepted end when reading JSON.</value> + <value>Unexpected end when reading JSON.</value> </data> <data name="FailedToReadRequestForm" xml:space="preserve"> <value>Failed to read the request form. {0}</value> diff --git a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/HttpClientExtensions.cs b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/HttpClientExtensions.cs index eefe2ac341..fbf1e5a65a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/HttpClientExtensions.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/HttpClientExtensions.cs @@ -69,7 +69,7 @@ public static class HttpClientExtensions { get { - return $"Excepted status code {ExpectedStatusCode}. Actual {ActualStatusCode}. Response Content:" + Environment.NewLine + ResponseContent; + return $"Expected status code {ExpectedStatusCode}. Actual {ActualStatusCode}. Response Content:" + Environment.NewLine + ResponseContent; } } } diff --git a/src/Shared/ProblemDetails/HttpValidationProblemDetailsJsonConverter.cs b/src/Shared/ProblemDetails/HttpValidationProblemDetailsJsonConverter.cs index 9c8bd17871..95b0a9cdcd 100644 --- a/src/Shared/ProblemDetails/HttpValidationProblemDetailsJsonConverter.cs +++ b/src/Shared/ProblemDetails/HttpValidationProblemDetailsJsonConverter.cs @@ -23,7 +23,7 @@ internal sealed class HttpValidationProblemDetailsJsonConverter : JsonConverter< { if (reader.TokenType != JsonTokenType.StartObject) { - throw new JsonException("Unexcepted end when reading JSON."); + throw new JsonException("Unexpected end when reading JSON."); } while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) @@ -47,7 +47,7 @@ internal sealed class HttpValidationProblemDetailsJsonConverter : JsonConverter< if (reader.TokenType != JsonTokenType.EndObject) { - throw new JsonException("Unexcepted end when reading JSON."); + throw new JsonException("Unexpected end when reading JSON."); } return problemDetails; diff --git a/src/Shared/ProblemDetails/ProblemDetailsJsonConverter.cs b/src/Shared/ProblemDetails/ProblemDetailsJsonConverter.cs index 13120d36d2..28369eb5e0 100644 --- a/src/Shared/ProblemDetails/ProblemDetailsJsonConverter.cs +++ b/src/Shared/ProblemDetails/ProblemDetailsJsonConverter.cs @@ -23,7 +23,7 @@ internal sealed class ProblemDetailsJsonConverter : JsonConverter<ProblemDetails if (reader.TokenType != JsonTokenType.StartObject) { - throw new JsonException("Unexcepted end when reading JSON."); + throw new JsonException("Unexpected end when reading JSON."); } while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) @@ -33,7 +33,7 @@ internal sealed class ProblemDetailsJsonConverter : JsonConverter<ProblemDetails if (reader.TokenType != JsonTokenType.EndObject) { - throw new JsonException("Unexcepted end when reading JSON."); + throw new JsonException("Unexpected end when reading JSON."); } return problemDetails; |