[TestFixtureSetUp]
        public void Setup()
        {
                 Object myobj = new Object();
        }

Just be aware that it will carryover any changes made to it from test
to test, in some cases you may want to init it.


On Nov 13, 3:06 pm, CodeShark <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to