C# Class Apache.NMS.Test.NMSTestSupport

useful base class for test cases
Afficher le fichier Open project: ThorTech/apache-nms Class Usage Examples

Protected Properties

Свойство Type Description
clientId string
idCounter int
passWord string
receiveTimeout System.TimeSpan
testRun int
userName string

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
GetConfigSearchPaths ( ) : string[]
NMSTestSupport ( ) : System
SetUp ( ) : void
TearDown ( ) : void

Method Details

AssertEquals() protected méthode

protected AssertEquals ( IMessage m1, IMessage m2 ) : void
m1 IMessage
m2 IMessage
Résultat void

AssertEquals() protected méthode

protected AssertEquals ( IMessage m1, IMessage m2, string message ) : void
m1 IMessage
m2 IMessage
message string
Résultat void

AssertEquals() protected méthode

protected AssertEquals ( ITextMessage m1, ITextMessage m2 ) : void
m1 ITextMessage
m2 ITextMessage
Résultat void

AssertTextMessageEqual() protected méthode

protected AssertTextMessageEqual ( ITextMessage m1, ITextMessage m2, string message ) : void
m1 ITextMessage
m2 ITextMessage
message string
Résultat void

AssertTextMessagesEqual() protected méthode

protected AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet ) : void
firstSet IMessage
secondSet IMessage
Résultat void

AssertTextMessagesEqual() protected méthode

protected AssertTextMessagesEqual ( IMessage firstSet, IMessage secondSet, string messsage ) : void
firstSet IMessage
secondSet IMessage
messsage string
Résultat void

CreateConnection() public méthode

Create a new connection to the broker.
public CreateConnection ( ) : IConnection
Résultat IConnection

CreateConnection() public méthode

Create a new connection to the broker.
public CreateConnection ( string newClientId ) : IConnection
newClientId string Client ID of the new connection.
Résultat IConnection

CreateDestination() public méthode

public CreateDestination ( ISession session, DestinationType type ) : IDestination
session ISession
type DestinationType
Résultat IDestination

CreateDestination() public méthode

public CreateDestination ( ISession session, DestinationType type, string name ) : IDestination
session ISession
type DestinationType
name string
Résultat IDestination

CreateDestination() public méthode

Create a destination. This will delete an existing destination and re-create it.
public CreateDestination ( ISession session, string destinationName ) : IDestination
session ISession
destinationName string
Résultat IDestination

CreateNMSFactory() protected méthode

Create the NMS Factory that can create NMS Connections.
protected CreateNMSFactory ( ) : bool
Résultat bool

CreateNMSFactory() protected méthode

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.
Résultat bool

GetConfiguredConnectionURI() protected méthode

Return the configured URI String. This function loads the connection settings from the configuration file.
protected GetConfiguredConnectionURI ( ) : string
Résultat string

GetConnectionConfigFileName() protected méthode

Name of the connection configuration filename.
protected GetConnectionConfigFileName ( ) : string
Résultat string

GetEnvVar() public static méthode

Get environment variable value.
public static GetEnvVar ( string varName, string defaultValue ) : string
varName string
defaultValue string
Résultat string

GetFactoryParams() protected méthode

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.
Résultat object[]

GetNameTestURI() protected méthode

The name of the connection configuration that CreateNMSFactory() will load.
protected GetNameTestURI ( ) : string
Résultat string

GetNodeValueAttribute() protected static méthode

protected static GetNodeValueAttribute ( XmlElement parentNode, string nodeName, string dflt ) : string
parentNode System.Xml.XmlElement
nodeName string
dflt string
Résultat string

GetTestClientId() public méthode

public GetTestClientId ( ) : string
Résultat string

RegisterDurableConsumer() protected méthode

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
Résultat void

ReplaceEnvVar() public static méthode

Replace embedded variable markups with environment variable values. Variable markups are of the following form: ${varname}
public static ReplaceEnvVar ( string srcText ) : string
srcText string
Résultat string

ReplaceEnvVar() public static méthode

Replace the variable with environment variable.
public static ReplaceEnvVar ( string srcText, string varName, string defaultValue ) : string
srcText string
varName string
defaultValue string
Résultat string

SendMessages() public méthode

public SendMessages ( IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
connection IConnection
destination IDestination
deliveryMode MsgDeliveryMode
count int
Résultat void

SendMessages() public méthode

public SendMessages ( IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
destination IDestination
deliveryMode MsgDeliveryMode
count int
Résultat void

SendMessages() public méthode

public SendMessages ( ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
session ISession
destination IDestination
deliveryMode MsgDeliveryMode
count int
Résultat void

ToHex() public static méthode

public static ToHex ( long value ) : string
value long
Résultat string

UnregisterDurableConsumer() protected méthode

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.
Résultat void

Property Details

clientId protected_oe property

protected string clientId
Résultat string

idCounter protected_oe property

protected int idCounter
Résultat int

passWord protected_oe property

protected string passWord
Résultat string

receiveTimeout protected_oe property

protected TimeSpan,System receiveTimeout
Résultat System.TimeSpan

testRun protected_oe property

protected int testRun
Résultat int

userName protected_oe property

protected string userName
Résultat string