Giles icon indicating copy to clipboard operation
Giles copied to clipboard

TestContext.CurrentContext.Test.FullName causes NullReferenceException

Open trayburn opened this issue 12 years ago • 1 comments

Giles was disagreeing with both the CodeRush test runner, and NUnit-Gui on the number of passing tests when I installed it. Ended up I was making a call in a TestSetUp to NUnit's "TestContext.CurrentContext.Test.FullName" to write it to the Console. This resulted in a Null Reference exception when run from Giles, but not two other test runners above.

trayburn avatar Apr 17 '13 16:04 trayburn

The reason is

The type 'NUnit.Framework.TestContext' exists in both 'NSpec.dll' and 'nunit.framework.dll'

NSpec has a dependency upon NUnit and the Giles console application project has explicit references to Giles.Runner.NSpec and Giles.Runner.NUnit which forces both NSpec.dll and nunit.framework.dll to be in the deploy directory.

reidev275 avatar Jun 19 '13 20:06 reidev275