Commit 47301faa authored by Nick Craver's avatar Nick Craver

nameof() cleanup

parent dcf17987
......@@ -10,7 +10,7 @@ namespace StackExchange.Redis.Tests
public class Locking : TestBase
{
[Test]
[TestCaseSource("TestModes")]
[TestCaseSource(nameof(TestModes))]
public void AggressiveParallel(TestMode testMode)
{
int count = 2;
......@@ -132,7 +132,7 @@ public static IEnumerable<TestMode> TestModes()
return (TestMode[])Enum.GetValues(typeof(TestMode));
}
[Test]
[TestCaseSource("TestModes")]
[TestCaseSource(nameof(TestModes))]
public void TakeLockAndExtend(TestMode mode)
{
bool withTran = mode == TestMode.MultiExec;
......@@ -219,7 +219,7 @@ public void TakeLockAndExtend(TestMode mode)
[Test]
[TestCaseSource("TestModes")]
[TestCaseSource(nameof(TestModes))]
public void TestBasicLockNotTaken(TestMode testMode)
{
using (var conn = Create(testMode))
......@@ -249,7 +249,7 @@ public void TestBasicLockNotTaken(TestMode testMode)
}
[Test]
[TestCaseSource("TestModes")]
[TestCaseSource(nameof(TestModes))]
public void TestBasicLockTaken(TestMode testMode)
{
using (var conn = Create(testMode))
......
......@@ -257,8 +257,8 @@ private static RedisConnection GetOldStyleConnection(string host, int port, bool
#endif
protected static TimeSpan RunConcurrent(Action work, int threads, int timeout = 10000, [CallerMemberName] string caller = null)
{
if (work == null) throw new ArgumentNullException("work");
if (threads < 1) throw new ArgumentOutOfRangeException("threads");
if (work == null) throw new ArgumentNullException(nameof(work));
if (threads < 1) throw new ArgumentOutOfRangeException(nameof(threads));
if(string.IsNullOrWhiteSpace(caller)) caller = Me();
Stopwatch watch = null;
ManualResetEvent allDone = new ManualResetEvent(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment