nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02226
[Bug 898256] [NEW] IEnumerable<T> for Datapoints doesn't work
Public bug reported:
When I try to return an IEnumerable<T> for the Datapoints attribute in
2.5.10, I get:
NUnitTheoryTest.SqrtTests.SquareRootDefinition:
System.InvalidCastException : Unable to cast object of type
'<Values>d__0' to type 'System.Collections.ICollection'.
The following code should work:
[Datapoints]
public IEnumerable<double> Values()
{
for (int i = 0; i < 10; i++)
yield return 0.25*i;
yield break;
}
** Affects: nunitv2
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/898256
Title:
IEnumerable<T> for Datapoints doesn't work
Status in NUnit V2 Test Framework:
New
Bug description:
When I try to return an IEnumerable<T> for the Datapoints attribute in
2.5.10, I get:
NUnitTheoryTest.SqrtTests.SquareRootDefinition:
System.InvalidCastException : Unable to cast object of type
'<Values>d__0' to type 'System.Collections.ICollection'.
The following code should work:
[Datapoints]
public IEnumerable<double> Values()
{
for (int i = 0; i < 10; i++)
yield return 0.25*i;
yield break;
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/898256/+subscriptions
Follow ups
References