diff --git a/src/NServiceBus.Core.Tests/Unicast/HandlerInvocationCache.cs b/src/NServiceBus.Core.Tests/Unicast/HandlerInvocationCache.cs index 588040d658e..6ab8b5b2ec1 100644 --- a/src/NServiceBus.Core.Tests/Unicast/HandlerInvocationCache.cs +++ b/src/NServiceBus.Core.Tests/Unicast/HandlerInvocationCache.cs @@ -44,14 +44,10 @@ public class StubMessage public class StubTimeoutHandler : IHandleTimeouts { - public bool TimeoutCalled; - public StubTimeoutState HandledState; - + public void Timeout(StubTimeoutState state) { - TimeoutCalled = true; - HandledState = state; } } diff --git a/src/NServiceBus.Core.Tests/Unicast/Receiving.cs b/src/NServiceBus.Core.Tests/Unicast/Receiving.cs index e97261c5784..8a823014242 100644 --- a/src/NServiceBus.Core.Tests/Unicast/Receiving.cs +++ b/src/NServiceBus.Core.Tests/Unicast/Receiving.cs @@ -481,11 +481,9 @@ public void Handle(EventMessage message) class CheckMessageIdHandler : IHandleMessages { - public static bool Called; public void Handle(EventMessage message) { - Called = true; } } diff --git a/src/NServiceBus.Core/DataBus/InMemory/InMemoryDataBus.cs b/src/NServiceBus.Core/DataBus/InMemory/InMemoryDataBus.cs index a5b19cd8d0d..43f6a576e44 100644 --- a/src/NServiceBus.Core/DataBus/InMemory/InMemoryDataBus.cs +++ b/src/NServiceBus.Core/DataBus/InMemory/InMemoryDataBus.cs @@ -61,6 +61,7 @@ public Entry Peek(string key) public class Entry { public byte[] Data; +// ReSharper disable once NotAccessedField.Global public DateTime ExpireAt; } } diff --git a/src/NServiceBus.Hosting.Tests/EndpointTypeTests.cs b/src/NServiceBus.Hosting.Tests/EndpointTypeTests.cs index 269debdba2d..07373197318 100644 --- a/src/NServiceBus.Hosting.Tests/EndpointTypeTests.cs +++ b/src/NServiceBus.Hosting.Tests/EndpointTypeTests.cs @@ -10,6 +10,8 @@ namespace EndpointTypeTests public abstract class TestContext { protected EndpointType EndpointType; + +// ReSharper disable once NotAccessedField.Global protected string TestValue; } @@ -148,15 +150,13 @@ public void when_serviceName_is_provided_via_hostArgs_it_should_have_first_prior [TestFixture] public class Constructor_Tests { - protected EndpointType EndpointType; - [Test] [ExpectedException(typeof (InvalidOperationException), ExpectedMessage = "Endpoint configuration type needs to have a default constructor", MatchType = MessageMatch.StartsWith)] public void When_type_does_not_have_empty_public_constructor_it_should_blow_up() { - EndpointType = new EndpointType(typeof (TypeWithoutEmptyPublicConstructor)); + new EndpointType(typeof (TypeWithoutEmptyPublicConstructor)); } } diff --git a/src/NServiceBus.PerformanceTests/Encryption/EncryptionTestMessage.cs b/src/NServiceBus.PerformanceTests/Encryption/EncryptionTestMessage.cs index 4e33b02ac8a..57b1c604d3c 100644 --- a/src/NServiceBus.PerformanceTests/Encryption/EncryptionTestMessage.cs +++ b/src/NServiceBus.PerformanceTests/Encryption/EncryptionTestMessage.cs @@ -9,6 +9,7 @@ namespace Runner.Encryption public class EncryptionTestMessage : MessageBase { public WireEncryptedString Secret { get; set; } +// ReSharper disable once NotAccessedField.Global public WireEncryptedString SecretField; public ClassForNesting CreditCard { get; set; } public WireEncryptedString SecretThatIsNull { get; set; }