C# Class Microsoft.Silverlight.Testing.UnitTestSystem

A central entry point for unit test projects and applications.
Mostra file Open project: garyjohnson/wpnest Class Usage Examples

Public Methods

Method Description
CreateDefaultSettings ( ) : UnitTestSettings

Creates the default settings that would be used by the UnitTestHarness if none were specified.

Assumes the calling assembly is a test assembly.

CreateTestPage ( ) : UIElement

Creates a new TestPage visual that in turn will setup and begin a unit test run.

Assumes the calling assembly is a test assembly.

CreateTestPage ( UnitTestSettings settings ) : UIElement

Creates a new TestPage visual that in turn will setup and begin a unit test run.

Assumes the calling assembly is a test assembly.

PrepareCustomLogProviders ( UnitTestSettings settings ) : void

A partial method for PrepareDefaultLogManager.

RegisterUnitTestProvider ( IUnitTestProvider provider ) : void

Register another available unit test provider for the unit test system.

SetStandardLogProviders ( UnitTestSettings settings ) : void

Prepares the default log manager.

SetTestService ( UnitTestSettings settings ) : void

A partial method for setting the TestService.

Private Methods

Method Description
CreateDefaultSettings ( Assembly callingAssembly ) : UnitTestSettings

Create a default settings object for unit testing.

MergeSettingsAndParameters ( TestServiceProvider testService, UnitTestSettings inputSettings ) : void

Merge any settings provided by a test service with the parameters that were passed inside the TestHarnessSettings.

OnTestHarnessCompleted ( Microsoft.Silverlight.Testing.Harness.TestHarnessCompletedEventArgs args ) : void

Call the TestHarnessCompleted event.

PrepareDefaultLogManagerOptional ( Microsoft.Silverlight.Testing.Harness.TestHarnessSettings settings ) : void

A partial method for PrepareDefaultLogManager.

PrepareTestService ( UnitTestSettings inputSettings, System.Action complete ) : void

Initializes the test service and its contained providers.

Run ( UnitTestSettings settings ) : void
SetTestService ( Microsoft.Silverlight.Testing.Harness.TestHarnessSettings settings ) : void

A partial method for setting the TestService.

TryAddVisualStudioLogProvider ( UnitTestSettings settings ) : void

Tries to instantiate and initialize a VSTT provider. Requires that XLinq is available and included in the application package.

Method Details

CreateDefaultSettings() public static method

Creates the default settings that would be used by the UnitTestHarness if none were specified.
Assumes the calling assembly is a test assembly.

CreateTestPage() public static method

Creates a new TestPage visual that in turn will setup and begin a unit test run.
Assumes the calling assembly is a test assembly.
public static CreateTestPage ( ) : UIElement
return System.Windows.UIElement

CreateTestPage() public static method

Creates a new TestPage visual that in turn will setup and begin a unit test run.
Assumes the calling assembly is a test assembly.
public static CreateTestPage ( UnitTestSettings settings ) : UIElement
settings UnitTestSettings Test harness settings to be applied.
return System.Windows.UIElement

PrepareCustomLogProviders() public static method

A partial method for PrepareDefaultLogManager.
public static PrepareCustomLogProviders ( UnitTestSettings settings ) : void
settings UnitTestSettings The test harness settings.
return void

RegisterUnitTestProvider() public static method

Register another available unit test provider for the unit test system.
public static RegisterUnitTestProvider ( IUnitTestProvider provider ) : void
provider IUnitTestProvider A unit test provider.
return void

SetStandardLogProviders() public static method

Prepares the default log manager.
public static SetStandardLogProviders ( UnitTestSettings settings ) : void
settings UnitTestSettings The test harness settings.
return void

SetTestService() public static method

A partial method for setting the TestService.
public static SetTestService ( UnitTestSettings settings ) : void
settings UnitTestSettings The test harness settings.
return void