-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1422 from DuendeSoftware/joe/6.3-bugfix/error-eve…
…nt-serialization Joe/6.3 bugfix/error event serialization
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) Duende Software. All rights reserved. | ||
// See LICENSE in the project root for license information. | ||
|
||
|
||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Duende.IdentityServer.Configuration; | ||
using Duende.IdentityServer.Endpoints.Results; | ||
using Duende.IdentityServer.Models; | ||
using Duende.IdentityServer.ResponseHandling; | ||
using Duende.IdentityServer.Validation; | ||
using FluentAssertions; | ||
using IdentityModel; | ||
using UnitTests.Common; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.WebUtilities; | ||
using Xunit; | ||
using Duende.IdentityServer.Services; | ||
using Duende.IdentityServer; | ||
using Duende.IdentityServer.Events; | ||
|
||
namespace UnitTests.Endpoints.Results; | ||
|
||
public class EventTests | ||
{ | ||
|
||
[Fact] | ||
public void UnhandledExceptionEventCanCallToString() | ||
{ | ||
try | ||
{ | ||
throw new InvalidOperationException("Boom"); | ||
} | ||
catch (Exception ex) | ||
{ | ||
var unhandledExceptionEvent = new UnhandledExceptionEvent(ex); | ||
|
||
var s = unhandledExceptionEvent.ToString(); | ||
|
||
s.Should().NotBeNullOrEmpty(); | ||
} | ||
} | ||
} |