Skip to content

Commit

Permalink
[main] Update dependencies from dotnet/efcore dotnet/runtime (#48558)
Browse files Browse the repository at this point in the history
[main] Update dependencies from dotnet/efcore dotnet/runtime


 - Fix Http Results test to respond to dotnet/runtime#87093

 - Convert to new generic JsonStringEnumConverter<TEnum> to fix JSON source generator warning.

InteractionType is used in a JsonSerializerContext. With dotnet/runtime#87224, there is now a warning to convert source generated usages of JsonStringEnumConverter to JsonStringEnumConverter<TEnum>.

I went ahead and updated the other 2 usages as well, to make them consistent.

 - Skip AcceptAsync_NoCertificateCallback_RemovedFromPendingConnections

See #48678
  • Loading branch information
dotnet-maestro[bot] committed Jun 8, 2023
1 parent d868553 commit 6575b28
Show file tree
Hide file tree
Showing 7 changed files with 239 additions and 238 deletions.
308 changes: 154 additions & 154 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions eng/Versions.props

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication;
/// <summary>
/// The type of authentication request.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
[JsonConverter(typeof(JsonStringEnumConverter<InteractionType>))]
public enum InteractionType
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication;
/// <summary>
/// Represents the status of an authentication operation.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
[JsonConverter(typeof(JsonStringEnumConverter<RemoteAuthenticationStatus>))]
public enum RemoteAuthenticationStatus
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ internal class RemoteAuthenticationServiceJavaScriptLoggingOptions
}

// Internal for testing purposes
internal record struct InternalAccessTokenResult([property: JsonConverter(typeof(JsonStringEnumConverter))] AccessTokenResultStatus Status, AccessToken Token);
internal record struct InternalAccessTokenResult([property: JsonConverter(typeof(JsonStringEnumConverter<AccessTokenResultStatus>))] AccessTokenResultStatus Status, AccessToken Token);
8 changes: 4 additions & 4 deletions src/Http/Http.Results/test/ResultsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,15 +1009,15 @@ public void Json_WithNullSerializerContext_ThrowsArgException()
[Fact]
public void Json_WithInvalidSerializerContext_ThrowsInvalidOperationException()
{
var ex = Assert.Throws<InvalidOperationException>(() => Results.Json(null, type: typeof(object), context: StringJsonContext.Default));
Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.Object' from the context '{typeof(StringJsonContext).FullName}'.");
var ex = Assert.Throws<InvalidOperationException>(() => Results.Json(null, type: typeof(Todo), context: StringJsonContext.Default));
Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'.");
}

[Fact]
public void JsonOfT_WithInvalidSerializerContext_ThrowsInvalidOperationException()
{
var ex = Assert.Throws<InvalidOperationException>(() => Results.Json<object>(null, context: StringJsonContext.Default));
Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.Object' from the context '{typeof(StringJsonContext).FullName}'.");
var ex = Assert.Throws<InvalidOperationException>(() => Results.Json<Todo>(null, context: StringJsonContext.Default));
Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'.");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public async Task AcceptAsync_Success_RemovedFromPendingConnections()

[ConditionalFact]
[MsQuicSupported]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/48678")]
public async Task AcceptAsync_NoCertificateCallback_RemovedFromPendingConnections()
{
// Arrange
Expand Down

0 comments on commit 6575b28

Please sign in to comment.