C# Class NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder

NUnitTestCaseBuilder is a utility class used by attributes that build test cases.
Mostra file Open project: nunit/nunit Class Usage Examples

Public Methods

Method Description
BuildTestMethod ( IMethodInfo method, System.Test parentSuite, TestCaseParameters parms ) : TestMethod

Builds a single NUnitTestMethod, either as a child of the fixture or as one of a set of test cases under a ParameterizedTestMethodSuite.

NUnitTestCaseBuilder ( ) : System

Constructs an NUnitTestCaseBuilder

Private Methods

Method Description
CheckTestMethodSignature ( TestMethod testMethod, TestCaseParameters parms ) : bool

Helper method that checks the signature of a TestMethod and any supplied parameters to determine if the test is valid. Currently, NUnitTestMethods are required to be public, non-abstract methods, either static or instance, returning void. They may take arguments but the _values must be provided or the TestMethod is not considered runnable. Methods not meeting these criteria will be marked as non-runnable and the method will return false in that case.

The return value is no longer used internally, but is retained for testing purposes.

MarkAsNotRunnable ( TestMethod testMethod, string reason ) : bool

Method Details

BuildTestMethod() public method

Builds a single NUnitTestMethod, either as a child of the fixture or as one of a set of test cases under a ParameterizedTestMethodSuite.
public BuildTestMethod ( IMethodInfo method, System.Test parentSuite, TestCaseParameters parms ) : TestMethod
method IMethodInfo The MethodInfo from which to construct the TestMethod
parentSuite System.Test The suite or fixture to which the new test will be added
parms TestCaseParameters The ParameterSet to be used, or null
return TestMethod

NUnitTestCaseBuilder() public method

Constructs an NUnitTestCaseBuilder
public NUnitTestCaseBuilder ( ) : System
return System