BizUnit, NAnt and MSTest

May 2, 2007 at 2:22 PM
Edited May 2, 2007 at 2:23 PM
I have a NAnt script running MSTest which is using the test list file managed by visual studio team suite test manager gui to run unit tests.
Will MStest run the BizUnit tests and can they be added to the test list?
Coordinator
May 3, 2007 at 9:46 PM
Hi,

Yes. BizUnit has no dependency on MSTest, NUnit or anything else. MSTest makes a great driver for BizUnit, so your tests which use BizUnit can be run in the same way that you are currently running your MSTest's from a NAnt script.

Here's an example BizUnit test case, as you can see it's just a regular MSTest, which you can run in the same way you are currently running your MSTests:

        [TestMethod]
        public void FactStuff()
        {
            Object[] factObjArray = null;
 
            // Create and Initialize facts...
 
            Context ctx = new Context();
            ctx.Add("Fact1", 32);
            ctx.Add("Fact2", factObjArray);
 
            BizUnit bizUnit = new BizUnit(@"..\..\..\Data\FactBasedRuleEngineStepTest.xml", ctx);
            bizUnit.RunTest();
        }

I suggest that you take a look at the BizUnit SDK which is installed with it, there are a bunch of samples there.

Thanks,

Kevin