Skip to content

Commit 30a9171

Browse files
authored
Fix Excepted -> Expected typos in repo (#44989)
1 parent 7840ed5 commit 30a9171

File tree

9 files changed

+43
-43
lines changed

9 files changed

+43
-43
lines changed

src/Http/Http.Extensions/test/HttpRequestJsonExtensionsTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public async Task ReadFromJsonAsyncGeneric_NonJsonContentType_ThrowError()
2121
var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await context.Request.ReadFromJsonAsync<int>());
2222

2323
// Assert
24-
var exceptedMessage = $"Unable to read the request as JSON because the request content type 'text/json' is not a known JSON content type.";
25-
Assert.Equal(exceptedMessage, ex.Message);
24+
var expectedMessage = $"Unable to read the request as JSON because the request content type 'text/json' is not a known JSON content type.";
25+
Assert.Equal(expectedMessage, ex.Message);
2626
}
2727

2828
[Fact]
@@ -36,8 +36,8 @@ public async Task ReadFromJsonAsyncGeneric_NoBodyContent_ThrowError()
3636
var ex = await Assert.ThrowsAsync<JsonException>(async () => await context.Request.ReadFromJsonAsync<int>());
3737

3838
// Assert
39-
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.";
40-
Assert.Equal(exceptedMessage, ex.Message);
39+
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.";
40+
Assert.Equal(expectedMessage, ex.Message);
4141
}
4242

4343
[Fact]

src/JSInterop/Microsoft.JSInterop/src/Implementation/JSObjectReferenceJsonWorker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public static long ReadJSObjectReferenceIdentifier(ref Utf8JsonReader reader)
3535
}
3636
else
3737
{
38-
throw new JsonException($"Unexcepted JSON property {reader.GetString()}.");
38+
throw new JsonException($"Unexpected JSON property {reader.GetString()}.");
3939
}
4040
}
4141
else
4242
{
43-
throw new JsonException($"Unexcepted JSON token {reader.TokenType}");
43+
throw new JsonException($"Unexpected JSON token {reader.TokenType}");
4444
}
4545
}
4646

src/JSInterop/Microsoft.JSInterop/src/Infrastructure/JSStreamReferenceJsonConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public override bool CanConvert(Type typeToConvert)
4242
}
4343
else
4444
{
45-
throw new JsonException($"Unexcepted JSON property {reader.GetString()}.");
45+
throw new JsonException($"Unexpected JSON property {reader.GetString()}.");
4646
}
4747
}
4848
else
4949
{
50-
throw new JsonException($"Unexcepted JSON token {reader.TokenType}");
50+
throw new JsonException($"Unexpected JSON token {reader.TokenType}");
5151
}
5252
}
5353

src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSObjectReferenceJsonConverterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void Read_Throws_IfJsonContainsUnknownContent()
3636

3737
// Act & Assert
3838
var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions));
39-
Assert.Equal("Unexcepted JSON property foo.", ex.Message);
39+
Assert.Equal("Unexpected JSON property foo.", ex.Message);
4040
}
4141

4242
[Fact]

src/JSInterop/Microsoft.JSInterop/test/Infrastructure/JSStreamReferenceJsonConverterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void Read_Throws_IfJsonContainsUnknownContent()
3636

3737
// Act & Assert
3838
var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions));
39-
Assert.Equal("Unexcepted JSON property foo.", ex.Message);
39+
Assert.Equal("Unexpected JSON property foo.", ex.Message);
4040
}
4141

4242
[Fact]

src/Mvc/Mvc.Core/src/Resources.resx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3-
<!--
4-
Microsoft ResX Schema
5-
3+
<!--
4+
Microsoft ResX Schema
5+
66
Version 2.0
7-
8-
The primary goals of this format is to allow a simple XML format
9-
that is mostly human readable. The generation and parsing of the
10-
various data types are done through the TypeConverter classes
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
1111
associated with the data types.
12-
12+
1313
Example:
14-
14+
1515
... ado.net/XML headers & schema ...
1616
<resheader name="resmimetype">text/microsoft-resx</resheader>
1717
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
2626
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
2727
<comment>This is a comment</comment>
2828
</data>
29-
30-
There are any number of "resheader" rows that contain simple
29+
30+
There are any number of "resheader" rows that contain simple
3131
name/value pairs.
32-
33-
Each data row contains a name, and value. The row also contains a
34-
type or mimetype. Type corresponds to a .NET class that support
35-
text/value conversion through the TypeConverter architecture.
36-
Classes that don't support this are serialized and stored with the
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
3737
mimetype set.
38-
39-
The mimetype is used for serialized objects, and tells the
40-
ResXResourceReader how to depersist the object. This is currently not
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
4141
extensible. For a given mimetype the value must be set accordingly:
42-
43-
Note - application/x-microsoft.net.object.binary.base64 is the format
44-
that the ResXResourceWriter will generate, however the reader can
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
4545
read any of the formats listed below.
46-
46+
4747
mimetype: application/x-microsoft.net.object.binary.base64
48-
value : The object must be serialized with
48+
value : The object must be serialized with
4949
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
5050
: and then encoded with base64 encoding.
51-
51+
5252
mimetype: application/x-microsoft.net.object.soap.base64
53-
value : The object must be serialized with
53+
value : The object must be serialized with
5454
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
5555
: and then encoded with base64 encoding.
5656
5757
mimetype: application/x-microsoft.net.object.bytearray.base64
58-
value : The object must be serialized into a byte array
58+
value : The object must be serialized into a byte array
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
@@ -481,7 +481,7 @@
481481
<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&lt;&gt;' 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>
482482
</data>
483483
<data name="UnexpectedJsonEnd" xml:space="preserve">
484-
<value>Unexcepted end when reading JSON.</value>
484+
<value>Unexpected end when reading JSON.</value>
485485
</data>
486486
<data name="FailedToReadRequestForm" xml:space="preserve">
487487
<value>Failed to read the request form. {0}</value>

src/Mvc/test/Mvc.FunctionalTests/Infrastructure/HttpClientExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public override string Message
6969
{
7070
get
7171
{
72-
return $"Excepted status code {ExpectedStatusCode}. Actual {ActualStatusCode}. Response Content:" + Environment.NewLine + ResponseContent;
72+
return $"Expected status code {ExpectedStatusCode}. Actual {ActualStatusCode}. Response Content:" + Environment.NewLine + ResponseContent;
7373
}
7474
}
7575
}

src/Shared/ProblemDetails/HttpValidationProblemDetailsJsonConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static HttpValidationProblemDetails ReadProblemDetails(ref Utf8JsonReader
2323
{
2424
if (reader.TokenType != JsonTokenType.StartObject)
2525
{
26-
throw new JsonException("Unexcepted end when reading JSON.");
26+
throw new JsonException("Unexpected end when reading JSON.");
2727
}
2828

2929
while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
@@ -47,7 +47,7 @@ public static HttpValidationProblemDetails ReadProblemDetails(ref Utf8JsonReader
4747

4848
if (reader.TokenType != JsonTokenType.EndObject)
4949
{
50-
throw new JsonException("Unexcepted end when reading JSON.");
50+
throw new JsonException("Unexpected end when reading JSON.");
5151
}
5252

5353
return problemDetails;

src/Shared/ProblemDetails/ProblemDetailsJsonConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public override ProblemDetails Read(ref Utf8JsonReader reader, Type typeToConver
2323

2424
if (reader.TokenType != JsonTokenType.StartObject)
2525
{
26-
throw new JsonException("Unexcepted end when reading JSON.");
26+
throw new JsonException("Unexpected end when reading JSON.");
2727
}
2828

2929
while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
@@ -33,7 +33,7 @@ public override ProblemDetails Read(ref Utf8JsonReader reader, Type typeToConver
3333

3434
if (reader.TokenType != JsonTokenType.EndObject)
3535
{
36-
throw new JsonException("Unexcepted end when reading JSON.");
36+
throw new JsonException("Unexpected end when reading JSON.");
3737
}
3838

3939
return problemDetails;

0 commit comments

Comments
 (0)