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.TestEngineActivator Class Reference

TestEngineActivator creates an instance of the test engine and returns an ITestEngine interface. More...

Static Public Member Functions

static ITestEngine CreateInstance (bool privateCopy=false)
 Create an instance of the test engine. More...
 
static ITestEngine CreateInstance (Version minVersion, bool privateCopy=false)
 Create an instance of the test engine with a minimum version. More...
 

Static Private Member Functions

static Assembly FindNewestEngine (Version minVersion, bool privateCopy)
 
static Assembly CheckPathForEngine (string path, Version minVersion, ref Version newestVersionFound, Assembly newestAssemblyFound)
 
static string FindEngineInRegistry (RegistryKey rootKey, string subKey)
 

Private Attributes

const string DefaultAssemblyName = "nunit.engine.dll"
 
const string NunitInstallRegKey = @"SOFTWARE\Nunit.org\Engine"
 
const string NunitInstallRegKeyWow64 = @"SOFTWARE\Wow6432Node\Nunit.org\Engine"
 

Detailed Description

TestEngineActivator creates an instance of the test engine and returns an ITestEngine interface.

Member Function Documentation

static ITestEngine NUnit.Engine.TestEngineActivator.CreateInstance ( bool  privateCopy = false)
inlinestatic

Create an instance of the test engine.

If private copy is false, the search order is the NUnit install directory for the current user, then the install directory for the local machine and finally the current AppDomain's ApplicationBase.

Parameters
privateCopyif set to true loads the engine found in the application base directory, otherwise searches for the test engine with the highest version installed. Defaults to true.
Exceptions
NUnitEngineNotFoundExceptionThrown when a test engine of the required minimum version is not found
Returns
An NUnit.Engine.ITestEngine

Referenced by NUnit.Engine.Services.ResultWriters.Tests.XmlOutputTest.InitializeTestEngineResult(), and NUnit.ConsoleRunner.Program.Main().

static ITestEngine NUnit.Engine.TestEngineActivator.CreateInstance ( Version  minVersion,
bool  privateCopy = false 
)
inlinestatic

Create an instance of the test engine with a minimum version.

If private copy is false, the search order is the NUnit install directory for the current user, then the install directory for the local machine and finally the current AppDomain's ApplicationBase.

Parameters
minVersionThe minimum version of the engine to return inclusive.
privateCopyif set to true loads the engine found in the application base directory, otherwise searches for the test engine with the highest version installed. Defaults to true.
Exceptions
NUnitEngineNotFoundExceptionThrown when a test engine of the given minimum version is not found
Returns
An ITestEngine
static Assembly NUnit.Engine.TestEngineActivator.FindNewestEngine ( Version  minVersion,
bool  privateCopy 
)
inlinestaticprivate
static Assembly NUnit.Engine.TestEngineActivator.CheckPathForEngine ( string  path,
Version  minVersion,
ref Version  newestVersionFound,
Assembly  newestAssemblyFound 
)
inlinestaticprivate
static string NUnit.Engine.TestEngineActivator.FindEngineInRegistry ( RegistryKey  rootKey,
string  subKey 
)
inlinestaticprivate

Member Data Documentation

const string NUnit.Engine.TestEngineActivator.DefaultAssemblyName = "nunit.engine.dll"
private
const string NUnit.Engine.TestEngineActivator.NunitInstallRegKey = @"SOFTWARE\Nunit.org\Engine"
private
const string NUnit.Engine.TestEngineActivator.NunitInstallRegKeyWow64 = @"SOFTWARE\Wow6432Node\Nunit.org\Engine"
private

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