Show / Hide Table of Contents

Class TestBase

Base class for all unit tests.

Inheritance
System.Object
TestBase
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Test
Assembly: Phoenix.Test.Infrastructure.dll
Syntax
public abstract class TestBase : IDisposable

Properties

View Source

Bootstrapper

Gets or sets the PhoenixBootstrapper which handles phoenix initialization and shutdown.

Declaration
protected PhoenixBootstrapper Bootstrapper { get; set; }
Property Value
Type Description
PhoenixBootstrapper
View Source

CleanupSettingsDataDirectory

Declaration
protected virtual bool CleanupSettingsDataDirectory { get; }
Property Value
Type Description
System.Boolean
View Source

DeviceExporter

Gets the DeviceStubExporter which provides services and mocks for the device system.

Declaration
protected DeviceStubExporter DeviceExporter { get; }
Property Value
Type Description
DeviceStubExporter
View Source

Services

Gets or sets the System.IServiceProvider which provides services and mocks for the current test run.

Declaration
protected IServiceProvider Services { get; set; }
Property Value
Type Description
System.IServiceProvider

Methods

View Source

CatalogAssemblies(Nullable<IServiceCollection>, Assembly[])

Adds the specified assemblies to the catalog along with a service collection.

Declaration
protected void CatalogAssemblies(IServiceCollection? serviceCollection, params Assembly[] assemblies)
Parameters
Type Name Description
System.Nullable<IServiceCollection> serviceCollection

The service collection.

System.Reflection.Assembly[] assemblies

List of assemblies to catalog.

View Source

CatalogAssemblies(Assembly[])

Adds the specified assemblies to the catalog along with the Infrastructure assembly.

Declaration
protected void CatalogAssemblies(params Assembly[] assemblies)
Parameters
Type Name Description
System.Reflection.Assembly[] assemblies

List of assemblies to catalog.

View Source

Dispose()

Declaration
public virtual void Dispose()
View Source

GetSettingsDataDirectoryRoot()

Declaration
protected virtual (string Directory, bool Cleanup) GetSettingsDataDirectoryRoot()
Returns
Type Description
System.ValueTuple<System.String, System.Boolean>
View Source

RegisterDeviceWithFactory<T>(String)

Register device types to use in tests.

Declaration
protected void RegisterDeviceWithFactory<T>(string name)
Parameters
Type Name Description
System.String name

The device type name.

Type Parameters
Name Description
T

The device factory type.

Implements

System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX