As you may noticed that Spec Explorer is actually available for VS2008 Professional edition, but VS2008 professional edition don’t include VSTS (And it is great that VS2010 Beta2 professional edition already include VSTS). Then if you installed Spec Explorer for VS2008 Professional Edition, you may not be able to build or run the generated test codes.
The design of test code generation (TCG) engine enabled generating test codes for NUnit test framework. Following are steps that you can follow to generate test codes for NUnit test framework with Spec Explorer:
using System; using System.Collections.Generic; using System.Text; using Microsoft.SpecExplorer.Runtime.Testing; using NUnit.Framework;
namespace NUnitExtension.TestSuite { public class NUnitTestClassBase : GeneratedTestClassBase { public override void BeginTest(string name) { Console.WriteLine("Beging executing test " + name); }
public override void EndTest() { Console.WriteLine("End executing test"); }
public override void Assert(bool condition, string description) { if (!condition) { throw new AssertionException(description); } }
public override void Assume(bool condition, string description) { if (!condition) { throw new AssertionException(description); } }
public override void Checkpoint(string description) { Console.WriteLine("Reaching checkpoint: " + description); }
public override void Comment(string description) { Console.WriteLine(description); } } }