Subclasses of ParameterDataAttribute producing nondeterministic output are marked as not run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Test Adapter |
Triaged
|
High
|
Unassigned |
Bug Description
[This bug is now tracked at https:/
The following code works fine with NUnit test adapter (VS 2012, nunit 2.6.2):
[AttributeU
public class AnyAttribute : ParameterDataAt
{
public override IEnumerable GetData(
{
if (parameter.
{
return new[] { 122 };
}
else
{
return new[] { "a" };
}
}
}
public class Class1234
{
[Test]
public void ShouldBEHAVIOR(
{
}
}
But the following does not (although it works just fine in gui standalone nunit runner) and VS Test Runner marks the test as not run:
[AttributeU
public class AnyAttribute : ParameterDataAt
{
public override IEnumerable GetData(
{
if (parameter.
{
return new[] { 122 };
}
else
{
return new[] { "a" + new Random().Next() }; //______ONLY CHANGE________!
}
}
}
public class Class1234
{
[Test]
public void ShouldBEHAVIOR(
{
}
}
Best regards,
grzesiek
This includes also tests having arguments marked with [Random] attribute.