Reporter | James Huntington (analyse-it) |
---|---|
Created | Jan 25, 2012 7:52:39 PM |
Updated | Jan 25, 2012 7:54:05 PM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Victor Kropp (victor.kropp) |
Subsystem | Unit Testing |
Affected versions | 6.0, 6.1 |
Fixed in build | No Fixed in build |
ReSharper 6.0 / 6.1 no longer supports NUnit test fixtures with arguments. The constructor of the test class is still called, as expected, but then the actual test methods don't run. The test just ends with the result Inconclusive.
Here's an example, which did work before ReSharper 6.0 / 6.1:
[TestFixture(10)]
public class Tests {
public Tests(int seed) {
_seed = seed;
}
private int _seed;
[Test]
public void TestMethod() {
Assert.That(_seed, Is.EqualTo(10));
}
}
The Tests constructor gets called with 10, but then execution ends and TestMethod is never invoked.
Here's an example, which did work before ReSharper 6.0 / 6.1:
[TestFixture(10)]
public class Tests {
public Tests(int seed) {
_seed = seed;
}
private int _seed;
[Test]
public void TestMethod() {
Assert.That(_seed, Is.EqualTo(10));
}
}
The Tests constructor gets called with 10, but then execution ends and TestMethod is never invoked.