Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyredondo committed Apr 5, 2021
1 parent 537487e commit 2aa6cad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/Datadog.Trace.Tests/DelegatesHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@ public class DelegatesHelperTests
[Fact]
public void GetProcessExitDelegateTest()
{
AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
var @delegate = DelegatesHelper.GetInternalProcessExitDelegate();
AppDomain.CurrentDomain.ProcessExit -= CurrentDomain_ProcessExit;
Assert.NotNull(@delegate);

void CurrentDomain_ProcessExit(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}

[Fact]
public void GetCancelKeyPressDelegateTest()
{
Console.CancelKeyPress += Console_CancelKeyPress;
var @delegate = DelegatesHelper.GetInternalCancelKeyPressDelegate();
Assert.NotNull(@delegate);
Console.CancelKeyPress -= Console_CancelKeyPress;
Assert.NotNull(@delegate);

void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
{
Expand Down

0 comments on commit 2aa6cad

Please sign in to comment.