SuiteBuilders (NUnit 2.4)

Purpose

A SuiteBuilder is an addin used to build a test fixture from a type. NUnit itself uses a SuiteBuilder to recognize and build TestFixtures.

Extension Point

An addin may use the host to access this extension point by name:

	IExtensionPoint suiteBuilders = host.GetExtensionPoint( "SuiteBuilders" );

Interface

The extension object passed to Install must implement the ISuiteBuilder interface:

	public interface ISuiteBuilder
	{
		bool CanBuildFrom( Type type );
		Test BuildFrom( Type type );
	}

CanBuildFrom should return true if the specified Type is one from which the builder is able to create a fixture. This usually involve examining the Type and its attriutes.

The BuildFrom method should return a test fixture completely populated with its contained test cases. Return null if it is not possible to build a fixture using the provided Type.