summaryrefslogtreecommitdiff
path: root/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-01-29 10:46:27 +0000
committerRobert Greig <rgreig@apache.org>2007-01-29 10:46:27 +0000
commit3b1d20656f0e881f6db4d4faaa9edf30b4e91f8b (patch)
tree42a06502e9dbd465503d54950ea5ad9f0e798082 /qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
parented51b35db62e3715e34d010728d9aa2c862b1a22 (diff)
downloadqpid-python-3b1d20656f0e881f6db4d4faaa9edf30b4e91f8b.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@501001 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs')
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs b/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
new file mode 100644
index 0000000000..ec0594263f
--- /dev/null
+++ b/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+using System;
+using NUnit.Framework;
+using Qpid.Client.Security;
+
+
+namespace Qpid.Client.Tests.Security
+{
+ [TestFixture]
+ public class CallbackRegistryHandlerTests
+ {
+ [Test]
+ public void ParsesConfiguration()
+ {
+ CallbackHandlerRegistry registry = CallbackHandlerRegistry.Instance;
+ Assert.AreEqual(3, registry.Mechanisms.Length);
+ Assert.Contains("TEST", registry.Mechanisms);
+
+ Type handlerType = registry.GetCallbackHandler("TEST");
+ Assert.IsNotNull(handlerType);
+ Assert.AreEqual(typeof(TestCallbackHandler), handlerType);
+ }
+ } // class CallbackRegistryHandlerTests
+
+ public class TestCallbackHandler : IAMQCallbackHandler
+ {
+ public void Initialize(Qpid.Client.Protocol.AMQProtocolSession session)
+ {
+ }
+ public void Handle(Qpid.Sasl.ISaslCallback[] callbacks)
+ {
+ }
+
+ } // class TestCallbackHandler
+
+} // namespace Qpid.Client.Tests.Connection