The same fixture instance is shared for all tests within it.
So you can either put the initialization into a [FixtureSetup] method or in the
constructor of the fixture.
-----Original Message-----
From: CodeShark <[EMAIL PROTECTED]>
Date: Thursday, Nov 13, 2008 12:06 pm
Subject: MbUnit A testing question...
To: "MbUnit.User" <[email protected]>Reply-To:
[email protected]
I am starting to integrate Mbunit tests into an existing application,
and need to instantiate an object and then run repeated tests against the same
object, sort of like this....
class mytests{
BuiltObj myobj;
[Test]
public void HasAttribute()
{
Assert.Equals(myobj.theAttribute,somevalue);
}
[test]
public void AnotherTest()
{
Assert.GreaterThan(myobj,asmallervalue);
}
myobj(){
theAttribute = new BuiltObj();
}
}
Thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---