Provide test parameter info in unit test sessions?
I frequently use NUnit's parameterized test support, like the following contrived example:
[TestFixture]
public class IntTests
{
IEnumerable Numbers { get { return new int[] { 3, 2, 1 }; } }
[Test]
public void GreaterThanOne([ValueSource("Numbers")]int input)
{
Assert.That(input, Is.GreaterThan(1));
}
}
This test will obviously fail the 1 case. Unfortunately, ReSharper offers no feedback on test method parameters, so I have to use TestDriven.Net to get parameter info for the failing test. It'd be nice to see some more informative output. The TD.Net output is the following:
TestCase 'ClassLibrary1.IntTests.GreaterThanOne(1)' failed: Expected: greater than 1 But was: 1 Class1.cs(28,0): at ClassLibrary1.IntTests.GreaterThanOne(Int32 input) 2 passed, 1 failed, 0 skipped, took 0.47 seconds (NUnit 2.5.2).
Thanks!
Please sign in to leave a comment.
Hello Dathan,
This is a known problem and we'll do our best to address it in the next ReSharper
release. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"