summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-12-16 16:54:53 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-12-16 16:54:53 +0000
commita6046e00077c4b47568cf4159ecda654cec2136f (patch)
treec16e5a575eb274db6a24a3a10d32269c36742ed7
parent52ab7d1e62606cbd5026dc01ba4bade906c7a479 (diff)
downloadqpid-python-a6046e00077c4b47568cf4159ecda654cec2136f.tar.gz
QPID-1537 : Added a test to ensure the version is correctly set for AMQUserManagementMBena
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@727089 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBeanTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBeanTest.java b/java/broker/src/test/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBeanTest.java
index f3c07d9eb2..6ba336e241 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBeanTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBeanTest.java
@@ -27,6 +27,8 @@ import java.io.FileWriter;
import java.io.IOException;
import org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
import junit.framework.TestCase;
@@ -97,6 +99,21 @@ public class AMQUserManagementMBeanTest extends TestCase
assertTrue(deleted);
}
+
+ public void testVersion()
+ {
+ try
+ {
+ ObjectName name = _amqumMBean.getObjectName();
+ assertEquals(AMQUserManagementMBean.VERSION, Integer.parseInt(name.getKeyProperty("version")));
+ }
+ catch (MalformedObjectNameException e)
+ {
+ fail(e.getMessage());
+ }
+
+ }
+
// ============================ Utility methods =========================