Table of Contents

Interface ITestCaseBuilder

Namespace
NUnit.Framework.Interfaces
Assembly
nunit.framework.dll

The ITestCaseBuilder interface is exposed by a class that knows how to build a test from a specified method, possibly containing child test cases.

public interface ITestCaseBuilder

Methods

BuildFrom(IMethodInfo, Test?)

Builds a single test from the specified method and context, possibly containing child test cases.

Test? BuildFrom(IMethodInfo method, Test? suite)

Parameters

method IMethodInfo

The method to be used as a test case

suite Test

The test suite being populated, or null

Returns

Test

CanBuildFrom(IMethodInfo, Test?)

Examine the method and determine if it is suitable for this builder to use in building a TestCase to be included in the suite being populated.

Note that returning false will cause the method to be ignored in loading the tests. If it is desired to load the method but label it as non-runnable, ignored, etc., then this method must return true.

bool CanBuildFrom(IMethodInfo method, Test? suite)

Parameters

method IMethodInfo

The test method to examine

suite Test

The suite being populated

Returns

bool