Photon Server API
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Properties | List of all members
Photon.Hive.Tests.TcpTests Class Reference

The test base. More...

Public Member Functions

 TcpTests ()
 Initializes a new instance of the TcpTests class. More...
 
void Join ()
 The join. More...
 
void JoinWithChannel ()
 The join with channel. More...
 
virtual void JoinWithPropertiesInt ()
 The join with properties int. More...
 
void JoinWithPropertiesString ()
 The join with properties string. More...
 
void JoinWithPropertyBroadcast ()
 The join with property broadcast. More...
 
void SendCustomEvent ()
 The send custom event. More...
 
void SendCustomEventToActorList ()
 Sends a custom event to a list of actors. More...
 
virtual void SendCustomEventWithLargeData ()
 The send custom event with large data. More...
 
void SendPing ()
 The send ping. More...
 
virtual void SetPropertiesWithBroadcast ()
 The set properties with broadcast. More...
 
virtual void SetPropertiesWithBroadcastV15 ()
 The set properties with broadcast v 15. More...
 

Protected Types

enum  PropertyKeys { PropertyKeys.ActorName, PropertyKeys.ActorAge, PropertyKeys.RoomColor, PropertyKeys.RoomTemperature }
 The property keys. More...
 

Protected Member Functions

virtual object GetActorNumberKey (int actorNumber)
 The get actor number key. More...
 
virtual TestClient InitClient ()
 The init client. More...
 
void JoinClientsToRoom (string roomName, TestClient client1, TestClient client2)
 The join clients to room. More...
 
void JoinClientsToRoom (string roomName, TestClient client1, TestClient client2, Hashtable clientProperties1, Hashtable clientProperties2, bool broadcastClientProperties)
 The join clients to room. More...
 
void LeaveClientsFromRoom (TestClient client1, TestClient client2)
 The leave clients from room. More...
 
void LogElapsedTime (ILogger logger, string prefix, TimeSpan elapsedTime, long numItems)
 The log elapsed time. More...
 

Static Protected Member Functions

static void CheckDefaultEventParameters (EventData eventArgs, OperationCode operationCode, int actorNumber)
 The check default event params. More...
 
static void CheckDefaultEventParameters (EventData eventArgs, EventCode eventEventCode, int actorNumber)
 The check default event params. More...
 
static void CheckDefaultOperationParameters (OperationResponse response, OperationCode operationCode)
 The check default operation params. More...
 
static void CheckEventParam (EventData eventArgs, ParameterKey paramKey, object expectedValue)
 The check event param. More...
 
static void CheckEventParam (EventData eventArgs, object key, object expectedValue)
 The check event param. More...
 
static void CheckEventParamExists (EventData eventArgs, ParameterKey paramKey)
 The check event param exists. More...
 
static void CheckEventParamExists (EventData eventArgs, object key)
 The check event param exists. More...
 
static void CheckJoinEvent (EventData eventArgs, int actorNumber)
 The check join event. More...
 
static void CheckJoinEvent (EventData eventArgs, int actorNumber, Hashtable expectedActorProperties)
 The check join event. More...
 
static void CheckJoinResponse (OperationResponse operationResponse, int expectedActorNumber)
 The check join response. More...
 
static void CheckParam (OperationResponse response, ParameterKey paramKey, object expectedValue)
 The check param. More...
 
static void CheckParamExists (OperationResponse response, ParameterKey paramKey)
 The check param exists. More...
 
static byte[] CreateByteArrayFromHexString (string hexString, char delimiter)
 Converts a hex string to an byte array. More...
 
static OperationRequest CreateJoinRequest (string roomName, Hashtable properties, bool broadcastProperties)
 The create join request. More...
 
static string CreateRandomRoomName ()
 The create random room name. More...
 

Properties

int WaitTime [get, set]
 Gets or sets WaitTime. More...
 

Detailed Description

The test base.

Member Enumeration Documentation

The property keys.

Enumerator
ActorName 

The actor name.

ActorAge 

The actor age.

RoomColor 

The room color.

RoomTemperature 

The room temperature.

Constructor & Destructor Documentation

Photon.Hive.Tests.TcpTests.TcpTests ( )
inline

Initializes a new instance of the TcpTests class.

Member Function Documentation

static void Photon.Hive.Tests.TcpTests.CheckDefaultEventParameters ( EventData  eventArgs,
OperationCode  operationCode,
int  actorNumber 
)
inlinestaticprotected

The check default event params.

Parameters
eventArgsThe event args.
operationCodeThe operation code.
actorNumberThe actor number.
static void Photon.Hive.Tests.TcpTests.CheckDefaultEventParameters ( EventData  eventArgs,
EventCode  eventEventCode,
int  actorNumber 
)
inlinestaticprotected

The check default event params.

Parameters
eventArgsThe event args.
eventEventCodeThe event code.
actorNumberThe actor number.
static void Photon.Hive.Tests.TcpTests.CheckDefaultOperationParameters ( OperationResponse  response,
OperationCode  operationCode 
)
inlinestaticprotected

The check default operation params.

Parameters
responseThe response.
operationCodeThe operation code.
static void Photon.Hive.Tests.TcpTests.CheckEventParam ( EventData  eventArgs,
ParameterKey  paramKey,
object  expectedValue 
)
inlinestaticprotected

The check event param.

Parameters
eventArgsThe event args.
paramKeyThe param key.
expectedValueThe expected value.
static void Photon.Hive.Tests.TcpTests.CheckEventParam ( EventData  eventArgs,
object  key,
object  expectedValue 
)
inlinestaticprotected

The check event param.

Parameters
eventArgsThe event args.
keyThe key.
expectedValueThe expected value.
static void Photon.Hive.Tests.TcpTests.CheckEventParamExists ( EventData  eventArgs,
ParameterKey  paramKey 
)
inlinestaticprotected

The check event param exists.

Parameters
eventArgsThe event args.
paramKeyThe param key.
static void Photon.Hive.Tests.TcpTests.CheckEventParamExists ( EventData  eventArgs,
object  key 
)
inlinestaticprotected

The check event param exists.

Parameters
eventArgsThe event args.
keyThe key.
static void Photon.Hive.Tests.TcpTests.CheckJoinEvent ( EventData  eventArgs,
int  actorNumber 
)
inlinestaticprotected

The check join event.

Parameters
eventArgsThe event args.
actorNumberThe actor number.
static void Photon.Hive.Tests.TcpTests.CheckJoinEvent ( EventData  eventArgs,
int  actorNumber,
Hashtable  expectedActorProperties 
)
inlinestaticprotected

The check join event.

Parameters
eventArgsThe event args.
actorNumberThe actor number.
expectedActorPropertiesThe expected actor properties.
static void Photon.Hive.Tests.TcpTests.CheckJoinResponse ( OperationResponse  operationResponse,
int  expectedActorNumber 
)
inlinestaticprotected

The check join response.

Parameters
operationResponseThe operation response.
expectedActorNumberThe expected actor number.
static void Photon.Hive.Tests.TcpTests.CheckParam ( OperationResponse  response,
ParameterKey  paramKey,
object  expectedValue 
)
inlinestaticprotected

The check param.

Parameters
responseThe response.
paramKeyThe param key.
expectedValueThe expected value.
static void Photon.Hive.Tests.TcpTests.CheckParamExists ( OperationResponse  response,
ParameterKey  paramKey 
)
inlinestaticprotected

The check param exists.

Parameters
responseThe response.
paramKeyThe param key.
static byte [] Photon.Hive.Tests.TcpTests.CreateByteArrayFromHexString ( string  hexString,
char  delimiter 
)
inlinestaticprotected

Converts a hex string to an byte array.

Parameters
hexStringThe hex string.
delimiterThe delimiter between the hex values.
Returns
A byte array.
static OperationRequest Photon.Hive.Tests.TcpTests.CreateJoinRequest ( string  roomName,
Hashtable  properties,
bool  broadcastProperties 
)
inlinestaticprotected

The create join request.

Parameters
roomNameThe room name.
propertiesThe properties.
broadcastPropertiesThe broadcast properties.
Returns
the join request
static string Photon.Hive.Tests.TcpTests.CreateRandomRoomName ( )
inlinestaticprotected

The create random room name.

Returns
The random room name.
virtual object Photon.Hive.Tests.TcpTests.GetActorNumberKey ( int  actorNumber)
inlineprotectedvirtual

The get actor number key.

Parameters
actorNumberThe actor number.
Returns
The actor number key.
virtual TestClient Photon.Hive.Tests.TcpTests.InitClient ( )
inlineprotectedvirtual

The init client.

Returns
the test client
void Photon.Hive.Tests.TcpTests.Join ( )
inline

The join.

void Photon.Hive.Tests.TcpTests.JoinClientsToRoom ( string  roomName,
TestClient  client1,
TestClient  client2 
)
inlineprotected

The join clients to room.

Parameters
roomNameThe room name.
client1The client 1.
client2The client 2.
void Photon.Hive.Tests.TcpTests.JoinClientsToRoom ( string  roomName,
TestClient  client1,
TestClient  client2,
Hashtable  clientProperties1,
Hashtable  clientProperties2,
bool  broadcastClientProperties 
)
inlineprotected

The join clients to room.

Parameters
roomNameThe room name.
client1The client 1.
client2The client 2.
clientProperties1The client properties 1.
clientProperties2The client properties 2.
broadcastClientPropertiesThe broadcast client properties.
void Photon.Hive.Tests.TcpTests.JoinWithChannel ( )
inline

The join with channel.

virtual void Photon.Hive.Tests.TcpTests.JoinWithPropertiesInt ( )
inlinevirtual

The join with properties int.

void Photon.Hive.Tests.TcpTests.JoinWithPropertiesString ( )
inline

The join with properties string.

void Photon.Hive.Tests.TcpTests.JoinWithPropertyBroadcast ( )
inline

The join with property broadcast.

void Photon.Hive.Tests.TcpTests.LeaveClientsFromRoom ( TestClient  client1,
TestClient  client2 
)
inlineprotected

The leave clients from room.

Parameters
client1The client 1.
client2The client 2.
void Photon.Hive.Tests.TcpTests.LogElapsedTime ( ILogger  logger,
string  prefix,
TimeSpan  elapsedTime,
long  numItems 
)
inlineprotected

The log elapsed time.

Parameters
loggerThe logger.
prefixThe prefix.
elapsedTimeThe elapsed time.
numItemsThe num items.
void Photon.Hive.Tests.TcpTests.SendCustomEvent ( )
inline

The send custom event.

void Photon.Hive.Tests.TcpTests.SendCustomEventToActorList ( )
inline

Sends a custom event to a list of actors.

virtual void Photon.Hive.Tests.TcpTests.SendCustomEventWithLargeData ( )
inlinevirtual

The send custom event with large data.

void Photon.Hive.Tests.TcpTests.SendPing ( )
inline

The send ping.

virtual void Photon.Hive.Tests.TcpTests.SetPropertiesWithBroadcast ( )
inlinevirtual

The set properties with broadcast.

virtual void Photon.Hive.Tests.TcpTests.SetPropertiesWithBroadcastV15 ( )
inlinevirtual

The set properties with broadcast v 15.

Property Documentation

int Photon.Hive.Tests.TcpTests.WaitTime
getsetprotected

Gets or sets WaitTime.