Skip to content

Commit

Permalink
[TaskCanceledExceptionDestructurer] Destrucutured object type inconsi…
Browse files Browse the repository at this point in the history
…stent #493
  • Loading branch information
Stéphane Saquet authored and RehanSaeed committed May 18, 2022
1 parent b2d6f08 commit bf2df9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public override void Destructure(
/// <param name="task">The task.</param>
/// <param name="innerDestructure">The inner destructure.</param>
/// <returns>The destructured task.</returns>
internal static object DestructureTask(
internal static object? DestructureTask(
Task? task,
Func<Exception, IReadOnlyDictionary<string, object?>?> innerDestructure)
{
if (task is null)
{
return "null";
return null;
}

var taskStatus = task.Status.ToString("G");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void TaskCanceledException_TaskNull()
// Assert
var tce = ex.Should().BeOfType<TaskCanceledException>().Which;
var exceptionDetails = ExtractExceptionDetails(LogAndDestructureException(tce));
Assert_ContainsPropertyWithValue(exceptionDetails, nameof(TaskCanceledException.Task), "null");
Assert_ContainsPropertyWithValue(exceptionDetails, nameof(TaskCanceledException.Task), null);
}

[Fact]
Expand Down

0 comments on commit bf2df9d

Please sign in to comment.