IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
NUnitTestFixtureBuilder is able to build a fixture given a class marked with a TestFixtureAttribute or an unmarked class containing test methods. In the first case, it is called by the attribute and in the second directly by NUnitSuiteBuilder. More...
Public Member Functions | |
TestSuite | BuildFrom (ITypeInfo typeInfo) |
Build a TestFixture from type provided. A non-null TestSuite must always be returned, since the method is generally called because the user has marked the target class as a fixture. If something prevents the fixture from being used, it should be returned nonetheless, labelled as non-runnable. More... | |
TestSuite | BuildFrom (ITypeInfo typeInfo, ITestFixtureData testFixtureData) |
Overload of BuildFrom called by tests that have arguments. Builds a fixture using the provided type and information in the ITestFixtureData object. More... | |
Private Member Functions | |
void | AddTestCasesToFixture (TestFixture fixture) |
Method to add test cases to the newly constructed fixture. More... | |
Test | BuildTestCase (IMethodInfo method, TestSuite suite) |
Method to create a test case from a MethodInfo and add it to the fixture being built. It first checks to see if any global TestCaseBuilder addin wants to build the test case. If not, it uses the internal builder collection maintained by this fixture builder. More... | |
Static Private Member Functions | |
static void | CheckTestFixtureIsValid (TestFixture fixture) |
static bool | IsStaticClass (Type type) |
Private Attributes | |
ITestCaseBuilder | _testBuilder = new DefaultTestCaseBuilder() |
Static Private Attributes | |
static readonly string | NO_TYPE_ARGS_MSG |
NUnitTestFixtureBuilder is able to build a fixture given a class marked with a TestFixtureAttribute or an unmarked class containing test methods. In the first case, it is called by the attribute and in the second directly by NUnitSuiteBuilder.
|
inline |
Build a TestFixture from type provided. A non-null TestSuite must always be returned, since the method is generally called because the user has marked the target class as a fixture. If something prevents the fixture from being used, it should be returned nonetheless, labelled as non-runnable.
typeInfo | An ITypeInfo for the fixture to be used. |
References NUnit.Framework.Interfaces.ITypeInfo.Type.
Referenced by NUnit.Framework.Internal.Builders.DefaultSuiteBuilder.BuildFrom().
|
inline |
Overload of BuildFrom called by tests that have arguments. Builds a fixture using the provided type and information in the ITestFixtureData object.
typeInfo | The TypeInfo for which to construct a fixture. |
testFixtureData | An object implementing ITestFixtureData or null. |
References NUnit.Framework.Interfaces.ITestData.Arguments, NUnit.Framework.Internal.TypeHelper.CanDeduceTypeArgsFromArgs(), NUnit.Framework.Interfaces.ITypeInfo.ContainsGenericParameters, NUnit.Framework.Interfaces.ITypeInfo.GetDisplayName(), NUnit.Framework.Interfaces.ITypeInfo.MakeGenericType(), NUnit.Framework.Interfaces.ITypeInfo.Namespace, NUnit.Framework.Interfaces.ITestData.RunState, NUnit.Framework.Interfaces.ITypeInfo.Type, and NUnit.Framework.Interfaces.ITestFixtureData.TypeArgs.
|
inlineprivate |
Method to add test cases to the newly constructed fixture.
fixture | The fixture to which cases should be added |
References NUnit.Framework.Interfaces.ITypeInfo.ContainsGenericParameters, NUnit.Framework.Interfaces.ITypeInfo.GetMethods(), NUnit.Framework.Internal.Test.Properties, NUnit.Framework.Internal.Test.RunState, NUnit.Framework.Interfaces.IPropertyBag.Set(), NUnit.Framework.Internal.PropertyNames.SkipReason, and NUnit.Framework.Internal.Test.TypeInfo.
|
inlineprivate |
Method to create a test case from a MethodInfo and add it to the fixture being built. It first checks to see if any global TestCaseBuilder addin wants to build the test case. If not, it uses the internal builder collection maintained by this fixture builder.
The default implementation has no test case builders. Derived classes should add builders to the collection in their constructor.
method | The method for which a test is to be created |
suite | The test suite being built. |
References NUnit.Framework.Interfaces.ITestCaseBuilder.BuildFrom(), and NUnit.Framework.Interfaces.ITestCaseBuilder.CanBuildFrom().
|
inlinestaticprivate |
References NUnit.Framework.Internal.TestSuite.Arguments, NUnit.Framework.Interfaces.ITypeInfo.ContainsGenericParameters, NUnit.Framework.Interfaces.ITypeInfo.HasConstructor(), NUnit.Framework.Interfaces.ITypeInfo.IsStaticClass, NUnit.Framework.Internal.Test.Properties, NUnit.Framework.Internal.Test.RunState, NUnit.Framework.Interfaces.IPropertyBag.Set(), NUnit.Framework.Internal.PropertyNames.SkipReason, and NUnit.Framework.Internal.Test.TypeInfo.
|
inlinestaticprivate |
|
staticprivate |
|
private |