Skip to content

Commit

Permalink
[TouchRunner] Fix unused variable warning by only defining the variab…
Browse files Browse the repository at this point in the history
…le when it's used. (#71)
  • Loading branch information
rolfbjarne committed Jul 14, 2020
1 parent 8bea179 commit 85f716d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NUnitLite/TouchRunner/TestCaseElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public TestCaseElement (TestMethod testCase, TouchRunner runner)
if (!Runner.OpenWriter (Test.FullName))
return;

var suite = (testCase.Parent as TestSuite);
#if NUNITLITE_NUGET
Run ();
#else
var suite = (testCase.Parent as TestSuite);
var context = TestExecutionContext.CurrentContext;
context.TestObject = Reflect.Construct (testCase.Method.ReflectedType, null);

Expand Down

0 comments on commit 85f716d

Please sign in to comment.