Hi,
I'm using MbUnit 3.3 and try to create tests with different values in [FixtureSetUp].
I found Jeff's blog with an example for that, but it's not working.
http://blog.bits-in-motion.com/2008/05/mbunit-testfixture-attribute-is-now.html
Please check example 4: A different data-driven fixture in C# using a constructor.
I noticed function Fixture never executed and the example didn't work at all.
I created a small example based on that.
public class Example
{
private String productName;
private String product;
[SetUp]
[Row("Fluffy Puff Marshmallows")]
[Row("Cheat Command O's")]
public void BuyProduct(String productName)
{
TestLog.WriteLine("Name: {0}", productName);
product = productName;
}
[TearDown]
public void ReturnProduct()
{
product = "";
}
[Test]
public void ShouldComeInAShinyBox()
{
TestLog.WriteLine("Test: {0}", product);
}
}
I got the following error message:
I notice Row or Column worked with only [Test] and no effect with [FixtureSetUp] or [SetUp].
Could you help me how can I create fixture with different values in [SetUp] part?
Thanks in advance.
Viktor