IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
NUnitTestCaseBuilder is a utility class used by attributes that build test cases. More...
Public Member Functions | |
NUnitTestCaseBuilder () | |
Constructs an NUnitTestCaseBuilder More... | |
TestMethod | BuildTestMethod (IMethodInfo method, Test parentSuite, TestCaseParameters parms) |
Builds a single NUnitTestMethod, either as a child of the fixture or as one of a set of test cases under a ParameterizedTestMethodSuite. More... | |
Static Private Member Functions | |
static bool | CheckTestMethodSignature (TestMethod testMethod, TestCaseParameters parms) |
Helper method that checks the signature of a TestMethod and any supplied parameters to determine if the test is valid. More... | |
static bool | MarkAsNotRunnable (TestMethod testMethod, string reason) |
Private Attributes | |
const string | DEFAULT_TEST_NAME_PATTERN = "{m}{a:40}" |
readonly Randomizer | _randomizer = Randomizer.CreateRandomizer() |
readonly TestNameGenerator | _nameGenerator |
NUnitTestCaseBuilder is a utility class used by attributes that build test cases.
|
inline |
Constructs an NUnitTestCaseBuilder
|
inline |
Builds a single NUnitTestMethod, either as a child of the fixture or as one of a set of test cases under a ParameterizedTestMethodSuite.
method | The MethodInfo from which to construct the TestMethod |
parentSuite | The suite or fixture to which the new test will be added |
parms | The ParameterSet to be used, or null |
References NUnit.Framework.Internal.TestParameters.ApplyToTest(), NUnit.Framework.Internal.TestParameters.Arguments, NUnit.Framework.Interfaces.ITypeInfo.FullName, NUnit.Framework.Internal.Test.FullName, NUnit.Framework.Internal.TestNameGenerator.GetDisplayName(), NUnit.Framework.Interfaces.IMethodInfo.MethodInfo, NUnit.Framework.Internal.TestParameters.OriginalArguments, NUnit.Framework.Internal.TestParameters.TestName, and NUnit.Framework.Interfaces.IMethodInfo.TypeInfo.
Referenced by NUnit.Framework.CombiningStrategyAttribute.BuildFrom(), NUnit.Framework.TestCaseSourceAttribute.BuildFrom(), NUnit.Framework.TestCaseAttribute.BuildFrom(), and NUnit.Framework.Internal.Builders.DefaultTestCaseBuilder.BuildSingleTestMethod().
|
inlinestaticprivate |
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.
testMethod | The TestMethod to be checked. If it is found to be non-runnable, it will be modified. |
parms | Parameters to be used for this test, or null |
The return value is no longer used internally, but is retained for testing purposes.
References NUnit.Framework.Internal.TestParameters.Arguments, NUnit.Framework.Internal.TypeHelper.ConvertArgumentList(), NUnit.Framework.Interfaces.ITypeInfo.GetGenericTypeDefinition(), NUnit.Framework.Interfaces.IMethodInfo.GetParameters(), NUnit.Framework.Internal.GenericMethodHelper.GetTypeArguments(), NUnit.Framework.Interfaces.IMethodInfo.IsAbstract, NUnit.Framework.Interfaces.IMethodInfo.IsGenericMethodDefinition, NUnit.Framework.Interfaces.ITypeInfo.IsGenericType, NUnit.Framework.Interfaces.IMethodInfo.IsPublic, NUnit.Framework.Interfaces.ITypeInfo.IsType(), NUnit.Framework.Internal.Test.Method, and NUnit.Framework.Internal.TypeHelper.NonmatchingType.
|
inlinestaticprivate |
|
private |
|
private |
|
private |