Remco,
I've been following the instructions from here:
http://gertjvr.wordpress...2-working-with-ncrunch/
With DynamicAnalysis and tests with AutoData attribute are not running:
class MyTest
{
[Test, AutoData]
public void SimpleParameters_AreRandom(int random, String guid)
{
// red here with exception in NCrunch window
Assert.AreNotEqual(0, random);
Assert.IsNotNullOrEmpty(guid);
}
}
The message I see in NCrunch (v2.1) is "The parent fixture of this test experienced a failure during test execution". There is nothing else to the test class, no other set up or any fixture parts.
Funny enough, this problem only comes when as a parameter I have a primitive type. If it is a class, NCrunch is fine with it:
class MyOtherTestClass
{
[Test, AutoData]
public void GivenClass_NCrunchWorks(Product product)
{
// This one works fine
Assert.IsNotNull(product);
}
[Test, AutoData]
public void PrimitiveTypes_CauseException(Product product, int number)
{
// And this is red
Assert.AreNotEqual(0, number);
}
}
class Product
{
public String Name { get; set; }
}
Seems like I've found a lot of edge cases that nobody apart from us uses -)
I can create a small solution with reproduction if that can help you.