C# Класс Apache.NMS.Test.NMSTestSupport

useful base class for test cases
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
clientId string
idCounter int
passWord string
receiveTimeout System.TimeSpan
testRun int
userName string

Открытые методы

Метод Описание
CreateConnection ( ) : IConnection

Create a new connection to the broker.

CreateConnection ( string newClientId ) : IConnection

Create a new connection to the broker.

CreateDestination ( ISession session, DestinationType type ) : IDestination
CreateDestination ( ISession session, DestinationType type, string name ) : IDestination
CreateDestination ( ISession session, string destinationName ) : IDestination

Create a destination. This will delete an existing destination and re-create it.

GetEnvVar ( string varName, string defaultValue ) : string

Get environment variable value.

GetTestClientId ( ) : string
ReplaceEnvVar ( string srcText ) : string

Replace embedded variable markups with environment variable values. Variable markups are of the following form: ${varname}

ReplaceEnvVar ( string srcText, string varName, string defaultValue ) : string

Replace the variable with environment variable.

SendMessages ( IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
SendMessages ( IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
SendMessages ( ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
ToHex ( long value ) : string

Защищенные методы

Метод Описание
AssertEquals ( IMessage m1, IMessage m2 ) : void
AssertEquals ( IMessage m1, IMessage m2, string message ) : void
AssertEquals ( ITextMessage m1, ITextMessage m2 ) : void
AssertTextMessageEqual ( ITextMessage m1, ITextMessage m2, string message ) : void
AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet ) : void
AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet, string messsage ) : void
CreateNMSFactory ( ) : bool

Create the NMS Factory that can create NMS Connections.

CreateNMSFactory ( string nameTestURI ) : bool

Create the NMS Factory that can create NMS Connections. This function loads the connection settings from the configuration file.

GetConfiguredConnectionURI ( ) : string

Return the configured URI String. This function loads the connection settings from the configuration file.

GetConnectionConfigFileName ( ) : string

Name of the connection configuration filename.

GetFactoryParams ( XmlElement uriNode ) : object[]

Get the parameters for the ConnectionFactory from the configuration file.

GetNameTestURI ( ) : string

The name of the connection configuration that CreateNMSFactory() will load.

GetNodeValueAttribute ( XmlElement parentNode, string nodeName, string dflt ) : string

RegisterDurableConsumer ( string connectionID, string destination, string consumerID, string selector, bool noLocal ) : void

Register a durable consumer

UnregisterDurableConsumer ( string connectionID, string consumerID ) : void

Unregister a durable consumer for the given connection ID.

Приватные методы

Метод Описание
GetConfigSearchPaths ( ) : string[]
NMSTestSupport ( ) : System
SetUp ( ) : void
TearDown ( ) : void

Описание методов

AssertEquals() защищенный Метод

protected AssertEquals ( IMessage m1, IMessage m2 ) : void
m1 IMessage
m2 IMessage
Результат void

AssertEquals() защищенный Метод

protected AssertEquals ( IMessage m1, IMessage m2, string message ) : void
m1 IMessage
m2 IMessage
message string
Результат void

AssertEquals() защищенный Метод

protected AssertEquals ( ITextMessage m1, ITextMessage m2 ) : void
m1 ITextMessage
m2 ITextMessage
Результат void

AssertTextMessageEqual() защищенный Метод

protected AssertTextMessageEqual ( ITextMessage m1, ITextMessage m2, string message ) : void
m1 ITextMessage
m2 ITextMessage
message string
Результат void

AssertTextMessagesEqual() защищенный Метод

protected AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet ) : void
firstSet IMessage
secondSet IMessage
Результат void

AssertTextMessagesEqual() защищенный Метод

protected AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet, string messsage ) : void
firstSet IMessage
secondSet IMessage
messsage string
Результат void

CreateConnection() публичный Метод

Create a new connection to the broker.
public CreateConnection ( ) : IConnection
Результат IConnection

CreateConnection() публичный Метод

Create a new connection to the broker.
public CreateConnection ( string newClientId ) : IConnection
newClientId string Client ID of the new connection.
Результат IConnection

CreateDestination() публичный Метод

public CreateDestination ( ISession session, DestinationType type ) : IDestination
session ISession
type DestinationType
Результат IDestination

CreateDestination() публичный Метод

public CreateDestination ( ISession session, DestinationType type, string name ) : IDestination
session ISession
type DestinationType
name string
Результат IDestination

CreateDestination() публичный Метод

Create a destination. This will delete an existing destination and re-create it.
public CreateDestination ( ISession session, string destinationName ) : IDestination
session ISession
destinationName string
Результат IDestination

CreateNMSFactory() защищенный Метод

Create the NMS Factory that can create NMS Connections.
protected CreateNMSFactory ( ) : bool
Результат bool

CreateNMSFactory() защищенный Метод

Create the NMS Factory that can create NMS Connections. This function loads the connection settings from the configuration file.
protected CreateNMSFactory ( string nameTestURI ) : bool
nameTestURI string The named connection configuration.
Результат bool

GetConfiguredConnectionURI() защищенный Метод

Return the configured URI String. This function loads the connection settings from the configuration file.
protected GetConfiguredConnectionURI ( ) : string
Результат string

GetConnectionConfigFileName() защищенный Метод

Name of the connection configuration filename.
protected GetConnectionConfigFileName ( ) : string
Результат string

GetEnvVar() публичный статический Метод

Get environment variable value.
public static GetEnvVar ( string varName, string defaultValue ) : string
varName string
defaultValue string
Результат string

GetFactoryParams() защищенный Метод

Get the parameters for the ConnectionFactory from the configuration file.
protected GetFactoryParams ( XmlElement uriNode ) : object[]
uriNode System.Xml.XmlElement Parent node of the factoryParams node.
Результат object[]

GetNameTestURI() защищенный Метод

The name of the connection configuration that CreateNMSFactory() will load.
protected GetNameTestURI ( ) : string
Результат string

GetNodeValueAttribute() защищенный статический Метод

protected static GetNodeValueAttribute ( XmlElement parentNode, string nodeName, string dflt ) : string
parentNode System.Xml.XmlElement
nodeName string
dflt string
Результат string

GetTestClientId() публичный Метод

public GetTestClientId ( ) : string
Результат string

RegisterDurableConsumer() защищенный Метод

Register a durable consumer
protected RegisterDurableConsumer ( string connectionID, string destination, string consumerID, string selector, bool noLocal ) : void
connectionID string Connection ID of the consumer.
destination string Destination name to register. Supports embedded prefix names.
consumerID string Name of the durable consumer.
selector string Selector parameters for consumer.
noLocal bool
Результат void

ReplaceEnvVar() публичный статический Метод

Replace embedded variable markups with environment variable values. Variable markups are of the following form: ${varname}
public static ReplaceEnvVar ( string srcText ) : string
srcText string
Результат string

ReplaceEnvVar() публичный статический Метод

Replace the variable with environment variable.
public static ReplaceEnvVar ( string srcText, string varName, string defaultValue ) : string
srcText string
varName string
defaultValue string
Результат string

SendMessages() публичный Метод

public SendMessages ( IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
connection IConnection
destination IDestination
deliveryMode MsgDeliveryMode
count int
Результат void

SendMessages() публичный Метод

public SendMessages ( IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
destination IDestination
deliveryMode MsgDeliveryMode
count int
Результат void

SendMessages() публичный Метод

public SendMessages ( ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
session ISession
destination IDestination
deliveryMode MsgDeliveryMode
count int
Результат void

ToHex() публичный статический Метод

public static ToHex ( long value ) : string
value long
Результат string

UnregisterDurableConsumer() защищенный Метод

Unregister a durable consumer for the given connection ID.
protected UnregisterDurableConsumer ( string connectionID, string consumerID ) : void
connectionID string Connection ID of the consumer.
consumerID string Name of the durable consumer.
Результат void

Описание свойств

clientId защищенное свойство

protected string clientId
Результат string

idCounter защищенное свойство

protected int idCounter
Результат int

passWord защищенное свойство

protected string passWord
Результат string

receiveTimeout защищенное свойство

protected TimeSpan,System receiveTimeout
Результат System.TimeSpan

testRun защищенное свойство

protected int testRun
Результат int

userName защищенное свойство

protected string userName
Результат string