Interface ITestCaseBuilder
The ITestCaseBuilder interface is exposed by a class that knows how to build a test from a specified method, possibly containing child test cases.
Namespace: NUnit.Framework.Interfaces
Assembly: nunit.framework.dll
Syntax
public interface ITestCaseBuilder
Methods
View SourceBuildFrom(IMethodInfo, Test?)
Builds a single test from the specified method and context, possibly containing child test cases.
Declaration
Test? BuildFrom(IMethodInfo method, Test? suite)
Parameters
Type | Name | Description |
---|---|---|
IMethodInfo | method | The method to be used as a test case |
Test | suite | The test suite being populated, or null |
Returns
Type | Description |
---|---|
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.
Declaration
bool CanBuildFrom(IMethodInfo method, Test? suite)
Parameters
Type | Name | Description |
---|---|---|
IMethodInfo | method | The test method to examine |
Test | suite | The suite being populated |
Returns
Type | Description |
---|---|
bool |