Class CapabilityStubBase
Abstract base class for stubbing capability interfaces on devices.
Namespace: Phoenix.Test.DeviceMockSystem
Assembly: Phoenix.Test.Infrastructure.dll
Syntax
public abstract class CapabilityStubBase : ICapability
Methods
View SourceAddInterfaceCapabilityStub(Type, Object)
Adds an interface implementation stub to the mapping.
Declaration
public void AddInterfaceCapabilityStub(Type interfaceType, object interfaceStub)
Parameters
Type | Name | Description |
---|---|---|
System.Type | interfaceType | The interface being stubbed. |
System.Object | interfaceStub | The stub implementation. |
GetCapabilityInterface<T>()
Returns the interface requested for this object.
Declaration
public T GetCapabilityInterface<T>()
where T : class
Returns
Type | Description |
---|---|
T | The interface if it is implemented or null if not implemented. |
Type Parameters
Name | Description |
---|---|
T | The interface that is being requested. |
HasCapabilityInterface(Type)
Determines if this object implements the specified interface type.
Declaration
public bool HasCapabilityInterface(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type of interface to check. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the object implements the interface or not. |
SetDeviceCapabilityMap(Dictionary<Type, Object>)
Sets the interface map directly.
Declaration
public void SetDeviceCapabilityMap(Dictionary<Type, object> interfaceMap)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Type, System.Object> | interfaceMap | The interface map to use. |