IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Engine.TestPackage Class Reference

TestPackage holds information about a set of test files to be loaded by a TestRunner. Each TestPackage represents tests for one or more test files. TestPackages may be named or anonymous, depending on how they are constructed. More...

Public Member Functions

 TestPackage (string filePath)
 Construct a named TestPackage, specifying a file path for the assembly or project to be used. More...
 
 TestPackage (IList< string > testFiles)
 Construct an anonymous TestPackage that wraps test files. More...
 
void AddSubPackage (TestPackage subPackage)
 Add a subproject to the package. More...
 
void AddSetting (string name, object value)
 Add a setting to a package and all of its subpackages. More...
 
GetSetting< T > (string name, T defaultSetting)
 Return the value of a setting or a default. More...
 

Properties

string ID [get, private set]
 Every test package gets a unique ID used to prefix test IDs within that package. More...
 
string Name [get]
 Gets the name of the package More...
 
string FullName [get, private set]
 Gets the path to the file containing tests. It may be an assembly or a recognized project type. More...
 
IList< TestPackageSubPackages [get, private set]
 Gets the list of SubPackages contained in this package More...
 
IDictionary< string, object > Settings [get, private set]
 Gets the settings dictionary for this package. More...
 

Private Member Functions

string GetNextID ()
 

Static Private Member Functions

static bool IsAssemblyFileType (string path)
 

Static Private Attributes

static int _nextID = 0
 

Detailed Description

TestPackage holds information about a set of test files to be loaded by a TestRunner. Each TestPackage represents tests for one or more test files. TestPackages may be named or anonymous, depending on how they are constructed.

Constructor & Destructor Documentation

NUnit.Engine.TestPackage.TestPackage ( string  filePath)
inline

Construct a named TestPackage, specifying a file path for the assembly or project to be used.

Parameters
filePathThe file path.
NUnit.Engine.TestPackage.TestPackage ( IList< string >  testFiles)
inline

Construct an anonymous TestPackage that wraps test files.

Parameters
testFiles

Member Function Documentation

string NUnit.Engine.TestPackage.GetNextID ( )
inlineprivate
void NUnit.Engine.TestPackage.AddSubPackage ( TestPackage  subPackage)
inline

Add a subproject to the package.

Parameters
subPackageThe subpackage to be added

Referenced by NUnit.Engine.Services.ProjectLoaders.VSSolution.GetTestPackage(), and NUnit.Engine.Services.ProjectLoaders.VSProject.GetTestPackage().

void NUnit.Engine.TestPackage.AddSetting ( string  name,
object  value 
)
inline

Add a setting to a package and all of its subpackages.

Parameters
nameThe name of the setting
valueThe value of the setting

Once a package is created, subpackages may have been created as well. If you add a setting directly to the Settings dictionary of the package, the subpackages are not updated. This method is used when the settings are intended to be reflected to all the subpackages under the package.

Referenced by NUnit.ConsoleRunner.ConsoleRunner.MakeTestPackage().

T NUnit.Engine.TestPackage.GetSetting< T > ( string  name,
defaultSetting 
)
inline

Return the value of a setting or a default.

Parameters
nameThe name of the setting
defaultSettingThe default value
Returns
static bool NUnit.Engine.TestPackage.IsAssemblyFileType ( string  path)
inlinestaticprivate

Member Data Documentation

int NUnit.Engine.TestPackage._nextID = 0
staticprivate

Property Documentation

string NUnit.Engine.TestPackage.ID
getprivate set

Every test package gets a unique ID used to prefix test IDs within that package.

The generated ID is only unique for packages created within the same AppDomain. For that reason, NUnit pre-creates all test packages that will be needed.

Referenced by NUnit.Engine.Runners.ProcessRunner.CreateFailedResult(), NUnit.Engine.Runners.DirectTestRunner.LoadPackage(), and NUnit.Engine.Api.Tests.TestPackageTests_SingleAssembly.PackageIDsAreUnique().

IList<TestPackage> NUnit.Engine.TestPackage.SubPackages
getprivate set

The documentation for this class was generated from the following file: