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 SourceBootstrapper
Gets or sets the PhoenixBootstrapper which handles phoenix initialization and shutdown.
Declaration
protected PhoenixBootstrapper Bootstrapper { get; set; }
Property Value
Type | Description |
---|---|
PhoenixBootstrapper |
CleanupSettingsDataDirectory
Declaration
protected virtual bool CleanupSettingsDataDirectory { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DeviceExporter
Gets the DeviceStubExporter which provides services and mocks for the device system.
Declaration
protected DeviceStubExporter DeviceExporter { get; }
Property Value
Type | Description |
---|---|
DeviceStubExporter |
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 SourceCatalogAssemblies(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. |
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. |
Dispose()
Declaration
public virtual void Dispose()
GetSettingsDataDirectoryRoot()
Declaration
protected virtual (string Directory, bool Cleanup) GetSettingsDataDirectoryRoot()
Returns
Type | Description |
---|---|
System.ValueTuple<System.String, System.Boolean> |
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