summaryrefslogtreecommitdiff
path: root/dotnet/Qpid.Client.Tests/Common
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-01-10 13:02:45 +0000
committerRobert Greig <rgreig@apache.org>2007-01-10 13:02:45 +0000
commite85458393975ce93ecd470e8fc3fd7906927b959 (patch)
tree00409139882ac5b14a9d59f73ad0fadcbfee2a96 /dotnet/Qpid.Client.Tests/Common
parentdc368b6d0483b85b9a056e2e6373a05e3c94f1da (diff)
downloadqpid-python-e85458393975ce93ecd470e8fc3fd7906927b959.tar.gz
Qpid-257 patch applied.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@494803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client.Tests/Common')
-rw-r--r--dotnet/Qpid.Client.Tests/Common/BaseMessagingTestFixture.cs25
1 files changed, 22 insertions, 3 deletions
diff --git a/dotnet/Qpid.Client.Tests/Common/BaseMessagingTestFixture.cs b/dotnet/Qpid.Client.Tests/Common/BaseMessagingTestFixture.cs
index e27174909c..fae610eb85 100644
--- a/dotnet/Qpid.Client.Tests/Common/BaseMessagingTestFixture.cs
+++ b/dotnet/Qpid.Client.Tests/Common/BaseMessagingTestFixture.cs
@@ -26,19 +26,32 @@ using Qpid.Client.qms;
namespace Qpid.Client.Tests
{
+ /// <summary>
+ /// Provides a basis for writing Unit tests that communicate with an AMQ protocol broker. By default it creates a connection
+ /// to a message broker running on localhost on the standard AMQ port, 5672, using guest:guest login credentials, on the default exchange,
+ /// 'test' queue.
+ /// </summary>
public class BaseMessagingTestFixture
{
private static ILog _logger = LogManager.GetLogger(typeof(BaseMessagingTestFixture));
+ /// <summary> The default AMQ connection URL to use for tests. </summary>
const string connectionUri = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672'";
+ /// <summary> Holds the test connection. </summary>
protected IConnection _connection;
+ /// <summary> Holds the test channel. </summary>
protected IChannel _channel;
+ /// <summary>
+ /// Creates the test connection and channel.
+ /// </summary>
[SetUp]
public virtual void Init()
{
+ _logger.Info("public virtual void Init(): called");
+
try
{
ConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(connectionUri);
@@ -52,14 +65,20 @@ namespace Qpid.Client.Tests
}
}
+ /// <summary>
+ /// Disposes the test connection. This is called manually because the connection is a field so dispose will not be automatically
+ /// called on it.
+ /// </summary>
[TearDown]
- public void Shutdown()
+ public virtual void Shutdown()
{
- Console.WriteLine("Shutdown");
+ _logger.Info("public virtual void Shutdown(): called");
+
if (_connection != null)
{
- Console.WriteLine("Disposing connection");
+ _logger.Info("Disposing connection.");
_connection.Dispose();
+ _logger.Info("Connection disposed.");
}
}
}