diff options
author | Robert Greig <rgreig@apache.org> | 2007-01-29 10:46:27 +0000 |
---|---|---|
committer | Robert Greig <rgreig@apache.org> | 2007-01-29 10:46:27 +0000 |
commit | 2bcc371558ce0659f53b86046cdf3d5de3b20910 (patch) | |
tree | d0c987cfa076eb90edb80620661d69a6e7354d3a /dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs | |
parent | fe736211136b60bec61c1a22d3765be9142c6b39 (diff) | |
download | qpid-python-2bcc371558ce0659f53b86046cdf3d5de3b20910.tar.gz |
(Patch supplied by Tomas Restrepo) QPID-291-2.diff applied. Adds SASL capability to the .Net client.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@501001 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs')
-rw-r--r-- | dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs b/dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs index 5aa6773e53..d5330898a0 100644 --- a/dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs +++ b/dotnet/Qpid.Client.Tests/connection/ConnectionTest.cs @@ -23,13 +23,13 @@ using NUnit.Framework; using Qpid.Client.qms; using Qpid.Messaging; -namespace Qpid.Client.Tests.connection +namespace Qpid.Client.Tests.Connection { [TestFixture] public class ConnectionTest { [Test] - public void simpleConnection() + public void SimpleConnection() { ConnectionInfo connectionInfo = new QpidConnectionInfo(); connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false)); @@ -40,7 +40,7 @@ namespace Qpid.Client.Tests.connection } [Test] - public void passwordFailureConnection() + public void PasswordFailureConnection() { ConnectionInfo connectionInfo = new QpidConnectionInfo(); connectionInfo.SetPassword("rubbish"); @@ -50,16 +50,17 @@ namespace Qpid.Client.Tests.connection using (IConnection connection = new AMQConnection(connectionInfo)) { Console.WriteLine("connection = " + connection); + // wrong + Assert.Fail("Authentication succeeded but should've failed"); } } - catch (AMQException) + catch (AMQException e) { - Assert.Fail(); -// if (!(e is AMQAuthenticationException)) -// { -// Assert.Fail("Expected AMQAuthenticationException!"); -// } - } + if (!(e.InnerException is AMQAuthenticationException)) + { + Assert.Fail("Expected AMQAuthenticationException!"); + } + } } // // [Test] @@ -96,4 +97,4 @@ namespace Qpid.Client.Tests.connection // } // } } -}
\ No newline at end of file +} |