Class TestTitleGameClient
Implements the logic for the test title's game client.
Implements
Inherited Members
Namespace: Phoenix.Aruba.TestTitle
Assembly: Phoenix.Plugin.Aruba.TestTitle.dll
Syntax
public class TestTitleGameClient : IGameClient
Remarks
Initializes a new instance of the TestTitleGameClient class.
Constructors
View SourceTestTitleGameClient(IDeviceManager, IPhoenixLogger, IConnectionScope<IDevice, TestHookGameClient>)
Implements the logic for the test title's game client.
Declaration
public TestTitleGameClient(IDeviceManager deviceManager, IPhoenixLogger logger, IConnectionScope<IDevice, TestHookGameClient> connectionScope)
Parameters
Type | Name | Description |
---|---|---|
IDeviceManager | deviceManager | The device manager. |
IPhoenixLogger | logger | The Phoenix logger. |
IConnectionScope<IDevice, TestHookGameClient> | connectionScope | The scoped connection that allows us to re-use existing connections. |
Remarks
Initializes a new instance of the TestTitleGameClient class.
Properties
View SourceIpAddress
Gets the IP address.
Declaration
public string IpAddress { get; }
Property Value
Type | Description |
---|---|
string |
Logger
Gets the logger to use.
Declaration
public IPhoenixLogger Logger { get; }
Property Value
Type | Description |
---|---|
IPhoenixLogger |
Methods
View SourceConnect(GameClientConnectionContext, CancellationToken)
Establishes a connection with the game client if it isn't already connected.
Declaration
public Task<bool> Connect(GameClientConnectionContext connectionContext, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GameClientConnectionContext | connectionContext | The connection context containing the information needed to establish a connection. |
CancellationToken | cancellationToken | A cancellation token. |
Returns
Type | Description |
---|---|
Task<bool> | Return whether the Game Client is connected. |
GetDeviceName()
Gets the name of the connected device.
Declaration
public string GetDeviceName()
Returns
Type | Description |
---|---|
string | The display name of the connected device.. |
GetRandomStringGuid()
Gets a random string GUID from the hook client.
Declaration
public string GetRandomStringGuid()
Returns
Type | Description |
---|---|
string | A random string GUID. |
GetRandomStringGuidAfter15s()
Gets a random string GUID from the hook client after 15s.
Declaration
public Task<string> GetRandomStringGuidAfter15s()
Returns
Type | Description |
---|---|
Task<string> | A random string GUID. |
SetupEvents(IEventAggregator)
Subscribes to events for when a bug is submitted or bug creation is canceled.
Declaration
public void SetupEvents(IEventAggregator eventAggregator)
Parameters
Type | Name | Description |
---|---|---|
IEventAggregator | eventAggregator | The event aggregator to use. |
TestTitleFuncThatReturnsAnInt()
Test Function for testing RPC Tokens
Declaration
public static int TestTitleFuncThatReturnsAnInt()
Returns
Type | Description |
---|---|
int | Returns 42. |
TestTitleFuncWithGuid(Guid, Guid)
Test Function with ids passed for hook caching.
Declaration
public static string TestTitleFuncWithGuid(Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
string | The bug resolve id and the resolve pass id as a string. |
TestTitleFuncWithGuid2(Guid, Guid)
Test Function with ids passed for hook caching.
Declaration
public static string TestTitleFuncWithGuid2(Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
string | The bug resolve id and the resolve pass id as a string. |
TestTitleFuncWithGuid3(Guid, Guid)
Test Function with ids passed for hook caching.
Declaration
public int TestTitleFuncWithGuid3(Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
int | An int from the cache. |
TestTitleFuncWithGuid4(Guid, Guid)
Test Function with ids passed for hook caching.
Declaration
public int TestTitleFuncWithGuid4(Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
int | An int from the cache. |
TestTitleFunctionThatThrowsAnException()
Test Function that throws an ArubaTokenFailedException.
Declaration
public static int TestTitleFunctionThatThrowsAnException()
Returns
Type | Description |
---|---|
int | NA. |
TestTitleFunctionUsingDelay()
Test function that delays for 5 seconds before resolving.
Declaration
public static Task<int> TestTitleFunctionUsingDelay()
Returns
Type | Description |
---|---|
Task<int> | An int. |
TestTitleGameClientFunction()
Test Function for testing RPC Tokens
Declaration
public static bool TestTitleGameClientFunction()
Returns
Type | Description |
---|---|
bool | Returns False. |
ThrowExceptionOrGetRandomStringGuid()
Throws an exception or gets a random string guid.
Declaration
public string ThrowExceptionOrGetRandomStringGuid()
Returns
Type | Description |
---|---|
string | A random string GUID. |
Remarks
The first call throws an exception. The second call gets the random string. Continues in that order.
ThrowTimeoutException()
Throws a timeout exception.
Declaration
public string ThrowTimeoutException()
Returns
Type | Description |
---|---|
string | Nothing, since exception is thrown. |