C# 클래스 NUnit.Framework.Api.FrameworkController

FrameworkController provides a facade for use in loading, browsing and running tests without requiring a reference to the NUnit framework. All calls are encapsulated in constructors for this class and its nested classes, which only require the types of the Common Type System as arguments. The controller supports four actions: Load, Explore, Count and Run. They are intended to be called by a driver, which should allow for proper sequencing of calls. Load must be called before any of the other actions. The driver may support other actions, such as reload on run, by combining these calls.
상속: LongLivedMarshalByRefObject
파일 보기 프로젝트 열기: nunit/nunit 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddSetting void
CountTests void
ExploreTests void
GetProcessorArchitecture string
Initialize void
LoadTests void
RunAsync void
RunAsync void
RunTests void
StopRun void

공개 메소드들

메소드 설명
CountTests ( string filter ) : int

Counts the number of test cases in the loaded TestSuite

ExploreTests ( string filter ) : string

Returns info about the tests in an assembly

FrameworkController ( Assembly assembly, string idPrefix, IDictionary settings ) : System

Construct a FrameworkController using the default builder and runner.

FrameworkController ( Assembly assembly, string idPrefix, IDictionary settings, string runnerType, string builderType ) : System

Construct a FrameworkController, specifying the types to be used for the runner and builder. This constructor is provided for purposes of development.

FrameworkController ( string assemblyNameOrPath, string idPrefix, IDictionary settings ) : System

Construct a FrameworkController using the default builder and runner.

FrameworkController ( string assemblyNameOrPath, string idPrefix, IDictionary settings, string runnerType, string builderType ) : System

Construct a FrameworkController, specifying the types to be used for the runner and builder. This constructor is provided for purposes of development.

InsertEnvironmentElement ( TNode targetNode ) : TNode

Inserts environment element

InsertSettingsElement ( TNode targetNode, object>.IDictionary settings ) : TNode

Inserts settings element

LoadTests ( ) : string

Loads the tests in the assembly

RunTests ( Action callback, string filter ) : string

Runs the tests in an assembly synchronously reporting back the test results through the callback or through the return value

RunTests ( string filter ) : string

Runs the tests in an assembly

StopRun ( bool force ) : void

Stops the test run

비공개 메소드들

메소드 설명
AddSetting ( TNode settingsNode, string name, object value ) : void
CountTests ( ICallbackEventHandler handler, string filter ) : void
ExploreTests ( ICallbackEventHandler handler, string filter ) : void
GetProcessorArchitecture ( ) : string
Initialize ( string assemblyPath, IDictionary settings ) : void
LoadTests ( ICallbackEventHandler handler ) : void
RunAsync ( Action callback, string filter ) : void

Runs the tests in an assembly asynchronously reporting back the test results through the callback

RunAsync ( ICallbackEventHandler handler, string filter ) : void
RunTests ( ICallbackEventHandler handler, string filter ) : void
StopRun ( ICallbackEventHandler handler, bool force ) : void

메소드 상세

CountTests() 공개 메소드

Counts the number of test cases in the loaded TestSuite
public CountTests ( string filter ) : int
filter string A string containing the XML representation of the filter to use
리턴 int

ExploreTests() 공개 메소드

Returns info about the tests in an assembly
public ExploreTests ( string filter ) : string
filter string A string containing the XML representation of the filter to use
리턴 string

FrameworkController() 공개 메소드

Construct a FrameworkController using the default builder and runner.
public FrameworkController ( Assembly assembly, string idPrefix, IDictionary settings ) : System
assembly System.Reflection.Assembly The test assembly
idPrefix string A prefix used for all test ids created under this controller.
settings IDictionary A Dictionary of settings to use in loading and running the tests
리턴 System

FrameworkController() 공개 메소드

Construct a FrameworkController, specifying the types to be used for the runner and builder. This constructor is provided for purposes of development.
public FrameworkController ( Assembly assembly, string idPrefix, IDictionary settings, string runnerType, string builderType ) : System
assembly System.Reflection.Assembly The test assembly
idPrefix string A prefix used for all test ids created under this controller.
settings IDictionary A Dictionary of settings to use in loading and running the tests
runnerType string The Type of the test runner
builderType string The Type of the test builder
리턴 System

FrameworkController() 공개 메소드

Construct a FrameworkController using the default builder and runner.
public FrameworkController ( string assemblyNameOrPath, string idPrefix, IDictionary settings ) : System
assemblyNameOrPath string The AssemblyName or path to the test assembly
idPrefix string A prefix used for all test ids created under this controller.
settings IDictionary A Dictionary of settings to use in loading and running the tests
리턴 System

FrameworkController() 공개 메소드

Construct a FrameworkController, specifying the types to be used for the runner and builder. This constructor is provided for purposes of development.
public FrameworkController ( string assemblyNameOrPath, string idPrefix, IDictionary settings, string runnerType, string builderType ) : System
assemblyNameOrPath string The full AssemblyName or the path to the test assembly
idPrefix string A prefix used for all test ids created under this controller.
settings IDictionary A Dictionary of settings to use in loading and running the tests
runnerType string The Type of the test runner
builderType string The Type of the test builder
리턴 System

InsertEnvironmentElement() 공개 정적인 메소드

Inserts environment element
public static InsertEnvironmentElement ( TNode targetNode ) : TNode
targetNode TNode Target node
리턴 TNode

InsertSettingsElement() 공개 정적인 메소드

Inserts settings element
public static InsertSettingsElement ( TNode targetNode, object>.IDictionary settings ) : TNode
targetNode TNode Target node
settings object>.IDictionary Settings dictionary
리턴 TNode

LoadTests() 공개 메소드

Loads the tests in the assembly
public LoadTests ( ) : string
리턴 string

RunTests() 공개 메소드

Runs the tests in an assembly synchronously reporting back the test results through the callback or through the return value
public RunTests ( Action callback, string filter ) : string
callback Action The callback that receives the test results
filter string A string containing the XML representation of the filter to use
리턴 string

RunTests() 공개 메소드

Runs the tests in an assembly
public RunTests ( string filter ) : string
filter string A string containing the XML representation of the filter to use
리턴 string

StopRun() 공개 메소드

Stops the test run
public StopRun ( bool force ) : void
force bool True to force the stop, false for a cooperative stop
리턴 void