From abd9562d706a5b3ebfe56488aa006aa6c68ef47e Mon Sep 17 00:00:00 2001 From: Thibaud Desodt Date: Mon, 16 Oct 2017 07:54:27 +0200 Subject: [PATCH] Removed a few AssignNullToNotNullAttribute warnings in tests --- test/Serilog.Tests/Context/LogContextTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Serilog.Tests/Context/LogContextTests.cs b/test/Serilog.Tests/Context/LogContextTests.cs index 7fc0b62df..3e46c1f00 100644 --- a/test/Serilog.Tests/Context/LogContextTests.cs +++ b/test/Serilog.Tests/Context/LogContextTests.cs @@ -31,7 +31,9 @@ static LogContextTests() public LogContextTests() { #if REMOTING + // ReSharper disable AssignNullToNotNullAttribute CallContext.LogicalSetData(typeof(LogContext).FullName, null); + // ReSharper restore AssignNullToNotNullAttribute #endif } @@ -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()); @@ -381,4 +385,4 @@ public bool IsCallable() } } #endif -} \ No newline at end of file +}