I have the following test fixture class and for reasons beyond me NUnit decides to run all of the test classes around this one but not this one
using System.Workflow.Runtime;
using System.Workflow.Runtime.Hosting;
using MyProject;
using NUnit.Framework;
namespace MyProject.Test
{
[TestFixture]
public class MyProjectTests
{
private const string Description = "This is a test Description generated through UNIT Tests";
private ManualWorkflowSchedulerService scheduler;
private WorkflowRuntime workflowRuntime;
[SetUp]
public void Init()
{
// set up workflow scheduler and runtime
this.workflowRuntime = new WorkflowRuntime();
this.scheduler = new ManualWorkflowSchedulerService(true); // run synchronously
this.workflowRuntime.AddService(this.scheduler);
this.workflowRuntime.StartRuntime();
// create Test Case Sources
object[] insertScenarios =
{
new object[] { typeof(RaiseScenario), this.workflowRuntime, Description, true, true, string.Empty },
new object[] { typeof(RaiseScenario), this.workflowRuntime, Description, true, false, "New Reason" }
};
}
/// <summary>
/// The insert tests.
/// </summary>
/// <param name="runtime">
/// The runtime.
/// </param>
/// <param name="description">
/// The description.
/// </param>
/// <param name="outstandingWorkDocUploaded">
/// The Doc One Uploaded.
/// </param>
/// <param name="DocTwoUploaded">
/// The Doc Two Uploaded.
/// </param>
/// <param name="shortageReason">
/// The shortage Reason.
/// </param>
[Test, TestCaseSource("insertScenarios")]
public void TestInsert(
WorkflowRuntime runtime,
string description,
bool DocOneUploaded,
bool DocTwoUploaded,
string Reason)
{
var message = Business.InsertBoatHandoverOutsideCrew(runtime, description, DocOneUploaded, DocTwoUploaded, Reason);
Assert.AreNotEqual(0, message.Id);
}
}
}
The structure of the test project is split into it's constituent parts i.e. each sub project of the solution has it's own directory within the test project. This has not been a problem for all other projects al coded in .Net 3.5 but this project's tests are now being ignored.