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 case from certain methods.
public interface ITestCaseBuilder
Remarks
This interface is not the same as the ITestCaseBuilder interface in NUnit 2.x. We have reused the name because the two products don't interoperate at all.
Methods
BuildFrom(MethodInfo, Test)
Build a TestCase from the provided MethodInfo for inclusion in the suite being constructed.
Test BuildFrom(MethodInfo method, Test suite)
Parameters
methodMethodInfoThe method to be used as a test case
suiteTestThe test suite being populated, or null
Returns
- Test
A TestCase or null
CanBuildFrom(MethodInfo, 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(MethodInfo method, Test suite)
Parameters
methodMethodInfoThe test method to examine
suiteTestThe suite being populated
Returns
- bool
True is the builder can use this method