IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
TestSuite represents a composite test, which contains other tests. More...
Public Member Functions | |
TestSuite (string name) | |
Initializes a new instance of the TestSuite class. More... | |
TestSuite (string parentSuiteName, string name) | |
Initializes a new instance of the TestSuite class. More... | |
TestSuite (ITypeInfo fixtureType) | |
Initializes a new instance of the TestSuite class. More... | |
TestSuite (Type fixtureType) | |
Initializes a new instance of the TestSuite class. More... | |
void | Sort () |
Sorts tests under this suite. More... | |
void | Add (Test test) |
Adds a test to the suite. More... | |
override TestResult | MakeTestResult () |
Overridden to return a TestSuiteResult. More... | |
override TNode | AddToXml (TNode parentNode, bool recursive) |
Returns an XmlNode representing the current result after adding it as a child of the supplied parent node. More... | |
![]() | |
void | ApplyAttributesToTest (ICustomAttributeProvider provider) |
Modify a newly constructed test by applying any of NUnit's common attributes, based on a supplied ICustomAttributeProvider, which is usually the reflection element from which the test was constructed, but may not be in some instances. The attributes retrieved are saved for use in subsequent operations. More... | |
TNode | ToXml (bool recursive) |
Returns the Xml representation of the test More... | |
int | CompareTo (object obj) |
Compares this test to another test for sorting purposes More... | |
Protected Member Functions | |
void | CheckSetUpTearDownMethods (Type attrType) |
Check that setup and teardown methods marked by certain attributes meet NUnit's requirements and mark the tests not runnable otherwise. More... | |
![]() | |
Test (string name) | |
Constructs a test given its name More... | |
Test (string pathName, string name) | |
Constructs a test given the path through the test hierarchy to its parent and a name. More... | |
Test (ITypeInfo typeInfo) | |
TODO: Documentation needed for constructor More... | |
Test (IMethodInfo method) | |
Construct a test from a MethodInfo More... | |
void | PopulateTestNode (TNode thisNode, bool recursive) |
Add standard attributes and members to a test node. More... | |
Properties | |
override IList< ITest > | Tests [get] |
Gets this test's child tests More... | |
override int | TestCaseCount [get] |
Gets a count of test cases represented by or contained under this test. More... | |
object[] | Arguments [get, set] |
The arguments to use in creating the fixture More... | |
bool | MaintainTestOrder [get, set] |
Set to true to suppress sorting this suite's contents More... | |
override bool | HasChildren [get] |
Gets a bool indicating whether the current test has any descendant tests. More... | |
override string | XmlElementName [get] |
Gets the name used for the top-level element in the XML representation of this test More... | |
![]() | |
string | Id [get, set] |
Gets or sets the id of the test More... | |
string | Name [get, set] |
Gets or sets the name of the test More... | |
string | FullName [get, set] |
Gets or sets the fully qualified name of the test More... | |
string | ClassName [get] |
Gets the name of the class containing this test. Returns null if the test is not associated with a class. More... | |
virtual string | MethodName [get] |
Gets the name of the method implementing this test. Returns null if the test is not implemented as a method. More... | |
ITypeInfo | TypeInfo [get, private set] |
Gets the TypeInfo of the fixture used in running this test or null if no fixture type is associated with it. More... | |
IMethodInfo | Method [get, set] |
Gets a MethodInfo for the method implementing this test. Returns null if the test is not implemented as a method. More... | |
RunState | RunState [get, set] |
Whether or not the test should be run More... | |
abstract string | XmlElementName [get] |
Gets the name used for the top-level element in the XML representation of this test More... | |
virtual string | TestType [get] |
Gets a string representing the type of test. Used as an attribute value in the XML representation of a test and has no other function in the framework. More... | |
virtual int | TestCaseCount [get] |
Gets a count of test cases represented by or contained under this test. More... | |
IPropertyBag | Properties [get, private set] |
Gets the properties for this test More... | |
bool | IsSuite [get] |
Returns true if this is a TestSuite More... | |
abstract bool | HasChildren [get] |
Gets a bool indicating whether the current test has any descendant tests. More... | |
ITest | Parent [get, set] |
Gets the parent as a Test object. Used by the core to set the parent. More... | |
abstract System.Collections.Generic.IList < ITest > | Tests [get] |
Gets this test's child tests More... | |
virtual object | Fixture [get, set] |
Gets or sets a fixture object for running this test. More... | |
static string | IdPrefix [get, set] |
Static prefix used for ids in this AppDomain. Set by FrameworkController. More... | |
int | Seed [get, set] |
Gets or Sets the Int value representing the seed for the RandomGenerator More... | |
![]() | |
string | Id [get] |
Gets the id of the test More... | |
string | Name [get] |
Gets the name of the test More... | |
string | FullName [get] |
Gets the fully qualified name of the test More... | |
string | ClassName [get] |
Gets the name of the class containing this test. Returns null if the test is not associated with a class. More... | |
string | MethodName [get] |
Gets the name of the method implementing this test. Returns null if the test is not implemented as a method. More... | |
ITypeInfo | TypeInfo [get] |
Gets the Type of the test fixture, if applicable, or null if no fixture type is associated with this test. More... | |
IMethodInfo | Method [get] |
Gets an IMethod for the method implementing this test. Returns null if the test is not implemented as a method. More... | |
RunState | RunState [get] |
Gets the RunState of the test, indicating whether it can be run. More... | |
int | TestCaseCount [get] |
Count of the test cases ( 1 if this is a test case ) More... | |
IPropertyBag | Properties [get] |
Gets the properties of the test More... | |
ITest | Parent [get] |
Gets the parent test, if any. More... | |
bool | IsSuite [get] |
Returns true if this is a test suite More... | |
bool | HasChildren [get] |
Gets a bool indicating whether the current test has any descendant tests. More... | |
System.Collections.Generic.IList < ITest > | Tests [get] |
Gets this test's child tests More... | |
object | Fixture [get] |
Gets a fixture object for running this test. More... | |
Private Attributes | |
List< ITest > | tests = new List<ITest>() |
Our collection of child tests More... | |
Additional Inherited Members | |
![]() | |
MethodInfo[] | setUpMethods |
The SetUp methods. More... | |
MethodInfo[] | tearDownMethods |
The teardown methods More... | |
TestSuite represents a composite test, which contains other tests.
|
inline |
Initializes a new instance of the TestSuite class.
name | The name of the suite. |
|
inline |
Initializes a new instance of the TestSuite class.
parentSuiteName | Name of the parent suite. |
name | The name of the suite. |
|
inline |
Initializes a new instance of the TestSuite class.
fixtureType | Type of the fixture. |
|
inline |
Initializes a new instance of the TestSuite class.
fixtureType | Type of the fixture. |
|
inline |
Sorts tests under this suite.
References NUnit.Framework.Internal.TestSuite.Sort().
Referenced by NUnit.Framework.Api.DefaultTestAssemblyBuilder.BuildTestAssembly(), and NUnit.Framework.Internal.TestSuite.Sort().
|
inline |
Adds a test to the suite.
test | The test. |
References NUnit.Framework.Internal.Test.Parent.
Referenced by NUnit.Framework.Internal.Builders.NamespaceTreeBuilder.Add(), NUnit.Framework.Internal.Builders.NamespaceTreeBuilder.AddSetUpFixture(), NUnit.Framework.Internal.Builders.NamespaceTreeBuilder.BuildFromNameSpace(), NUnit.Framework.Attributes.DescriptionTests.FixtureDescription(), NUnit.Framework.Api.DefaultTestAssemblyBuilder.GetFixtures(), NUnit.Framework.Attributes.OneTimeSetupTearDownTest.IgnoredFixtureShouldNotCallFixtureSetUpOrTearDown(), and NUnit.Framework.Assertions.AssertIgnoreTests.IgnoreWorksForTestSuite().
|
inlinevirtual |
Overridden to return a TestSuiteResult.
Implements NUnit.Framework.Internal.Test.
Referenced by NUnit.Framework.Internal.TestResultTests.SetUp().
|
inlinevirtual |
Returns an XmlNode representing the current result after adding it as a child of the supplied parent node.
parentNode | The parent node. |
recursive | If true, descendant results are included |
Implements NUnit.Framework.Internal.Test.
References NUnit.Framework.Interfaces.TNode.AddAttribute(), NUnit.Framework.Interfaces.TNode.AddElement(), and NUnit.Framework.Internal.Test.AddToXml().
|
inlineprotected |
Check that setup and teardown methods marked by certain attributes meet NUnit's requirements and mark the tests not runnable otherwise.
attrType | The attribute type to check for |
References NUnit.Framework.Internal.Reflect.GetMethodsWithAttribute(), and NUnit.Framework.Internal.PropertyNames.SkipReason.
Our collection of child tests
|
get |
Gets this test's child tests
The list of child tests
Referenced by NUnit.Framework.Internal.Builders.NamespaceTreeBuilder.AddSetUpFixture(), NUnit.Framework.Tests.Attributes.AuthorTests.AuthorOnTestCase(), NUnit.Framework.Attributes.CategoryAttributeTests.CanDeriveFromCategoryAttribute(), NUnit.Framework.Attributes.PropertyAttributeTests.CanDeriveFromPropertyAttribute(), NUnit.Framework.Attributes.TestFixtureSourceTests.CanIgnoreIndividualFixtures(), NUnit.Framework.Attributes.TestFixtureSourceTests.CanMarkIndividualFixturesExplicit(), NUnit.Framework.Internal.TestFixtureTests.CannotRunGenericFixtureDerivedFromAbstractFixtureWithNoArgsProvided(), NUnit.Framework.Internal.TestFixtureTests.CannotRunGenericFixtureWithNoArgsProvided(), NUnit.Framework.Internal.TestFixtureTests.CanRunGenericFixtureDerivedFromAbstractFixtureWithArgsProvided(), NUnit.Framework.Internal.TestFixtureTests.CanRunGenericFixtureWithProperArgsProvided(), NUnit.Framework.Attributes.TestCaseAttributeTests.CanSpecifyCategory(), NUnit.Framework.Attributes.TestCaseAttributeTests.CanSpecifyDescription(), NUnit.Framework.Attributes.TestCaseAttributeTests.CanSpecifyMultipleCategories(), NUnit.Framework.Attributes.CategoryAttributeTests.CanSpecifyOnMethodAndTestCase(), NUnit.Framework.Attributes.TestCaseAttributeTests.CanSpecifyTestName_FixedText(), NUnit.Framework.Attributes.TestCaseAttributeTests.CanSpecifyTestName_WithMethodName(), NUnit.Framework.Attributes.CategoryAttributeTests.CategoryOnTestMethod(), NUnit.Framework.Attributes.RepeatAttributeTests.CategoryWorksWithRepeatedTest(), NUnit.Framework.Attributes.RetryAttributeTests.CategoryWorksWithRetry(), NUnit.Framework.Internal.TestXmlTests.CheckXmlForTest(), NUnit.TestUtilities.TestAssert.ChildNotRunnable(), NUnit.Framework.Internal.Execution.CompositeWorkItem.CreateChildWorkItems(), NUnit.Framework.Attributes.PropertyAttributeTests.CustomPropertyAttribute(), NUnit.Framework.Attributes.DescriptionTests.DescriptionOnTestCase(), NUnit.Framework.Attributes.DescriptionTests.FixtureDescription(), NUnit.Framework.Internal.TestFixtureTests.FixtureInheritingTwoTestFixtureAttributesIsLoadedOnlyOnce(), NUnit.Framework.Attributes.ParameterizedTestFixtureNamingTests.FixtureInstancesAreNamedCorrectly(), NUnit.Framework.Attributes.TestCaseSourceTests.HandlesExceptionInTestCaseSource(), NUnit.Framework.Attributes.OneTimeSetupTearDownTest.IgnoredFixtureShouldNotCallFixtureSetUpOrTearDown(), NUnit.Framework.Attributes.ParameterizedTestFixtureNamingTests.MethodWithoutParamsIsNamedCorrectly(), NUnit.Framework.Attributes.ParameterizedTestFixtureNamingTests.MethodWithParamsIsNamedCorrectly(), NUnit.Framework.Internal.NUnitTestCaseBuilderTests.ParametrizedTestCaseTests(), NUnit.Framework.Attributes.PropertyAttributeTests.PropertiesWithNumericValues(), NUnit.Framework.Attributes.PropertyAttributeTests.PropertyWithStringValue(), NUnit.Framework.Internal.TestXmlTests.SetUp(), NUnit.Framework.Attributes.ParameterizedTestFixtureNamingTests.SuiteHasCorrectNumberOfInstances(), NUnit.Framework.Attributes.TestCaseAttributeTests.TestCaseRunnableState(), NUnit.Framework.Tests.Attributes.TestOfTests.TestOfOnTestCase(), and NUnit.Framework.Attributes.CategoryAttributeTests.TestWithInvalidCategoryNameIsNotRunnable().
|
get |
Gets a count of test cases represented by or contained under this test.
Referenced by NUnit.Framework.Internal.TestMethodSignatureTests.TestMethodWithMultipleTestCasesUsesCorrectNames().
|
getset |
The arguments to use in creating the fixture
Referenced by NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.CheckTestFixtureIsValid(), and NUnit.Framework.Internal.Commands.OneTimeSetUpCommand.OneTimeSetUpCommand().
|
getsetprotected |
Set to true to suppress sorting this suite's contents
|
get |
Gets a bool indicating whether the current test has any descendant tests.
|
get |
Gets the name used for the top-level element in the XML representation of this test