Skip to content

Commit

Permalink
Removed a few AssignNullToNotNullAttribute warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsimbalar committed Oct 16, 2017
1 parent 2f71498 commit abd9562
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/Serilog.Tests/Context/LogContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ static LogContextTests()
public LogContextTests()
{
#if REMOTING
// ReSharper disable AssignNullToNotNullAttribute
CallContext.LogicalSetData(typeof(LogContext).FullName, null);
// ReSharper restore AssignNullToNotNullAttribute
#endif
}

Expand Down Expand Up @@ -266,7 +268,9 @@ public void DoesNotPreventCrossDomainCalls()
{
domain = AppDomain.CreateDomain("LogContextTests", null, AppDomain.CurrentDomain.SetupInformation);

// ReSharper disable AssignNullToNotNullAttribute
var callable = (RemotelyCallable)domain.CreateInstanceAndUnwrap(typeof(RemotelyCallable).Assembly.FullName, typeof(RemotelyCallable).FullName);
// ReSharper restore AssignNullToNotNullAttribute

using (LogContext.PushProperty("Anything", 1001))
Assert.True(callable.IsCallable());
Expand Down Expand Up @@ -381,4 +385,4 @@ public bool IsCallable()
}
}
#endif
}
}

0 comments on commit abd9562

Please sign in to comment.