summaryrefslogtreecommitdiff
path: root/java/management/tools/qpid-cli/test
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2011-05-16 13:27:46 +0000
committerRobert Gemmell <robbie@apache.org>2011-05-16 13:27:46 +0000
commitce255d2f49fcaa1c831bafad8c54c1c2e2f6730c (patch)
tree08357343c7bb9563142421835449a716455f069e /java/management/tools/qpid-cli/test
parent14d40e51232912d77c92edc9cef74f30608eee79 (diff)
downloadqpid-python-ce255d2f49fcaa1c831bafad8c54c1c2e2f6730c.tar.gz
QPID-3260: remove defunct java/management/tools/qpid-cli module
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1103727 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/tools/qpid-cli/test')
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java41
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java30
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java73
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java80
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java79
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java26
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java79
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java79
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java77
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java82
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java80
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java78
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java78
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java69
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java83
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java83
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java26
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java83
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java74
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java84
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java64
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java79
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfigProperty.java26
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfiguration.java64
-rw-r--r--java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXinfo.java30
25 files changed, 0 insertions, 1647 deletions
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java b/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java
deleted file mode 100644
index d9758245cd..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.apache.qpid.commands.*;
-import org.apache.qpid.commands.objects.*;
-import org.apache.qpid.utils.TestCommandLineOption;
-import org.apache.qpid.utils.TestCommandLineOptionParser;
-import org.apache.qpid.utils.TestJMXConfiguration;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( { TestCommand.class, TestCommandExecutionEngine.class, TestCommandLineOption.class,
- TestCommandLineOptionParser.class, TestConnector.class, TestJMXConfiguration.class, TestAllObject.class,
- TestConnectionObject.class, TestExchangeObject.class, TestQueueObject.class, TestVirtualHostObject.class,
- TestUserManagementObject.class, TestCommanddelete.class, TestCommandlist.class, TestCommandinfo.class,
- TestCommandmove.class, TestCommandview.class, TestCommandviewcontent.class, TestCommandLineInterpreter.class
-
-})
-public class AllTest
-{
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java b/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java
deleted file mode 100644
index 90163460ce..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-package org.apache.qpid;
-
-public interface ConnectionConstants
-{
- String BROKER_HOSTNAME = "localhost";
- String BROKER_PORT = "8999";
- String USERNAME = "guest";
- String PASSWORD = "guest";
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java b/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java
deleted file mode 100644
index 6889e8faad..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid;
-
-import java.io.IOException;
-
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.utils.JMXinfo;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommandExecutionEngine
-{
- String line;
- String[] command;
- CommandLineOptionParser commandlineoptionparser;
- JMXinfo info;
- CommandExecutionEngine engine;
- Connector connector;
-
- @Before
- public void setup() throws Exception
- {
-
- connector = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
-
- }
-
- @Test
- public void TestCommandSelector() throws Exception
- {
- line = "list -o queue";
- command = line.split(" ");
- commandlineoptionparser = new CommandLineOptionParser(command);
- info = new JMXinfo(connector.getConnector(), commandlineoptionparser, connector.getMBeanServerConnection());
- engine = new CommandExecutionEngine(info);
- Assert.assertEquals(engine.CommandSelector(), true);
- }
-
- @After
- public void cleanup()
- {
- try
- {
- connector.getConnector().close();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java b/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java
deleted file mode 100644
index 07344598bf..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid;
-
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXConnector;
-
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommandLineInterpreter
-{
-
- // CommandLineInterpreter test = new CommandLineInterpreter();
- /*
- * In this class there are only methodes which are displaying data on
- * console so no test can be written
- */
- String command = "-h " + ConnectionConstants.BROKER_HOSTNAME + " -p " + ConnectionConstants.BROKER_PORT
- + " info -o queue -n ping -v test";
- Connector conn = null;
- JMXConnector jmxc = null;
- MBeanServerConnection mbsc = null;
- CommandLineOptionParser parser = null;
-
- String[] args = null;
-
- @Before
- public void startup() throws Exception
- {
- args = command.split(" ");
- // System.out.println(args[0]);
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- jmxc = conn.getConnector();
- mbsc = conn.getMBeanServerConnection();
- parser = new CommandLineOptionParser(args, args[0]);
-
- }
-
- @Test
- public void TestSetQueryString() throws Exception
- {
- CommandLineInterpreter.oneshotmode(args, parser, jmxc, mbsc);
- Assert.assertEquals(args[0], "info");
- Assert.assertEquals(args[1], "-o");
- Assert.assertEquals(args[2], "queue");
- Assert.assertEquals(args[3], "-n");
- Assert.assertEquals(args[4], "ping");
- Assert.assertEquals(args[5], "-v");
- Assert.assertEquals(args[6], "test");
- }
-
- @After
- public void cleanup()
- {
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java b/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java
deleted file mode 100644
index ea450b5caa..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid;
-
-import java.io.IOException;
-
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXServiceURL;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestConnector
-{
- Connector test;
- JMXServiceURL svc_url;
- JMXConnector connector;
- MBeanServerConnection mbsc;
-
- @Before
- public void setup() throws Exception
- {
- test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- String url = "service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi";
-
- }
-
- @Test
- public void testGetConnector()
- {
- Assert.assertEquals(test.getConnector(), test.getConnector());
- }
-
- @Test
- public void testGetMBeanServerConnection()
- {
- Assert.assertEquals(test.getMBeanServerConnection(), test.getMBeanServerConnection());
- }
-
- @After
- public void cleanup()
- {
- try
- {
-
- test.getConnector().close();
- test = null;
- }
- catch (IOException e)
- {
- e.printStackTrace(); // To change body of catch statement use File |
- // Settings | File Templates.
- }
- test = null;
- }
-
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java b/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java
deleted file mode 100644
index c14f4bb1bb..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid;
-
-public class TestReportGenerator
-{
-
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java
deleted file mode 100644
index 085d7220e9..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.Command;
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.utils.JMXinfo;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommand
-{
- String command = "list -o queue";
- String[] list;
- Connector test;
- MBeanServerConnection mbsc;
- JMXinfo info;
- CommandLineOptionParser parser;
- Command cmd;
-
- @Before
- public void setup() throws Exception
- {
- list = command.split(" ");
- parser = new CommandLineOptionParser(list);
- test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- info = new JMXinfo(test.getConnector(), parser, test.getMBeanServerConnection());
- cmd = new Commandinfo(info);
-
- }
-
- @Test
- public void TestOptionChecker()
- {
- Assert.assertEquals(cmd.optionchecker("o"), "queue");
- }
-
- @Test
- public void TestCheckOptionSetting()
- {
- Assert.assertEquals(cmd.checkoptionsetting("o"), true);
- Assert.assertEquals(cmd.checkoptionsetting("p"), false);
- }
-
- @After
- public void cleanup()
- {
- parser = null;
- test = null;
- info = null;
- cmd = null;
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java
deleted file mode 100644
index 60249c6940..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.Assert;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.utils.JMXinfo;
-import org.apache.qpid.utils.CommandLineOptionParser;
-
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
-
-public class TestCommanddelete
-{
- JMXinfo info = null;
- String command = "delete -o queue -n ping -v test -t 1";
- Commanddelete delete = null;
- Connector conn;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- delete = new Commanddelete(info);
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- delete.execute();
- Assert.assertEquals(delete.getObject(), "queue");
- Assert.assertEquals(delete.getVirtualhost(), "test");
- Assert.assertEquals(delete.getName(), "ping");
- Assert.assertEquals(delete.getnumber(), 1);
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java
deleted file mode 100644
index 24263eea73..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import org.apache.qpid.utils.JMXinfo;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.ConnectionConstants;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.Assert;
-import org.junit.After;
-
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
-
-public class TestCommandinfo
-{
- JMXinfo info = null;
- String command = "info -o queue -n ping -v test";
- CommandImpl infocommand = null;
- Connector conn = null;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- infocommand = new Commandinfo(info);
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- infocommand.execute();
- Assert.assertEquals(infocommand.getObject(), "queue");
- Assert.assertEquals(infocommand.getVirtualhost(), "test");
- Assert.assertEquals(infocommand.getName(), "ping");
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java
deleted file mode 100644
index ac759889fd..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXConnector;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.utils.JMXinfo;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommandlist
-{
- /*
- * All the methods in Commandlist doesn't have any arguments and no return
- * type.
- */
- JMXinfo info = null;
- String command = "list -o queue -n ping -v test";
- Commandlist list = null;
- Connector conn = null;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- list = new Commandlist(info);
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- list.execute();
- Assert.assertEquals(list.getObject(), "queue");
- Assert.assertEquals(list.getVirtualhost(), "test");
- Assert.assertEquals(list.getName(), "ping");
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java
deleted file mode 100644
index 3ff7890662..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.utils.JMXinfo;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Assert;
-
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
-
-public class TestCommandmove
-{
- JMXinfo info = null;
- String command = "move -o queue -n1 ping -v1 test -n2 message_queue -fmid 10 -tmid 12";
- Commandmove move = null;
- Connector conn = null;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- move = new Commandmove(info);
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- move.execute();
- Assert.assertEquals(move.getObject(), "queue");
- Assert.assertEquals(move.getVirtualhost(), "test");
- Assert.assertEquals(move.getname1(), "ping");
- Assert.assertEquals(move.getname2(), "message_queue");
- Assert.assertEquals(move.getfmid(), 10);
- Assert.assertEquals(move.gettmid(), 12);
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java
deleted file mode 100644
index f46b8626b8..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.Connector;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.utils.JMXinfo;
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.Assert;
-
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXConnector;
-
-public class TestCommandview
-{
- JMXinfo info = null;
- String command = "view -o queue -n ping -v test -t 10";
- Commandview view = null;
- Connector conn = null;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- view = new Commandview(info);
- }
-
- @Test
- public void TestSetQueryString()
- {
- view.execute();
- Assert.assertEquals(view.getObject(), "queue");
- Assert.assertEquals(view.getVirtualhost(), "test");
- Assert.assertEquals(view.getName(), "ping");
- Assert.assertEquals(view.getnumber(), 10);
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java
deleted file mode 100644
index f4a8f22aff..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands;
-
-import org.apache.qpid.utils.JMXinfo;
-import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.ConnectionConstants;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Assert;
-
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
-
-public class TestCommandviewcontent
-{
- JMXinfo info = null;
- String command = "viewcontent -o queue -n ping -v test -id 10";
- Commandviewcontent viewcontent = null;
- Connector conn = null;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- JMXConnector jmxc = conn.getConnector();
- MBeanServerConnection mbsc = conn.getMBeanServerConnection();
- CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
- info = new JMXinfo(jmxc, parser, mbsc);
- viewcontent = new Commandviewcontent(info);
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- viewcontent.execute();
- Assert.assertEquals(viewcontent.getObject(), "queue");
- Assert.assertEquals(viewcontent.getnumber(), 10);
- Assert.assertEquals(viewcontent.getName(), "ping");
- Assert.assertEquals(viewcontent.getVirtualhost(), "test");
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java
deleted file mode 100644
index af993e9205..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestAllObject {
- Connector conn;
- MBeanServerConnection mbsc;
- AllObjects test;
- String test1,test2;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new AllObjects(mbsc);
- test1 = "empty input1";
- test2 = "empty input2";
-
-
- }
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test1,test2);
- Assert.assertEquals(test.querystring,"org.apache.qpid:*");
-
- }
-
- @After
- public void cleanup()
- {
- try{
- conn.getConnector().close();
- }catch(Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java
deleted file mode 100644
index f91a519108..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestConnectionObject
-{
- Connector conn;
- MBeanServerConnection mbsc;
- ConnectionObject test;
- String test1, test2, test3;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new ConnectionObject(mbsc);
- test1 = "ping";
- test2 = "test";
- test3 = "object";
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test3, test1, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,VirtualHost=test,*");
- test.querystring = null;
- test.setQueryString(test3, test1, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,VirtualHost=test,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,*");
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java
deleted file mode 100644
index 5ffbe9854f..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestExchangeObject
-{
- Connector conn;
- MBeanServerConnection mbsc;
- ExchangeObject test;
- String test1, test2, test3;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new ExchangeObject(mbsc);
- test1 = "ping";
- test2 = "test";
- test3 = "object";
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test3, test1, null);
- // System.out.println(test.querystring);
- // System.out.println("org.apache.qpid:type=VitualHost.Exchange,name=ping,*");
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,*");
- test.querystring = null;
- test.setQueryString(test3, test1, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, null);
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java
deleted file mode 100644
index 600c567368..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-public class TestObjectNames
-{
-
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java
deleted file mode 100644
index fb7f42e1ae..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestQueueObject
-{
- Connector conn;
- MBeanServerConnection mbsc;
- QueueObject test;
- String test1, test2, test3;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new QueueObject(mbsc);
- test1 = "ping";
- test2 = "test";
- test3 = "object";
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test3, test1, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,*");
- test.querystring = null;
- test.setQueryString(test3, test1, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,*");
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java
deleted file mode 100644
index 863bf62311..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestUserManagementObject
-{
- Connector conn;
- MBeanServerConnection mbsc;
- UserManagementObject test;
- String test1, test2, test3;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new UserManagementObject(mbsc);
- test1 = "ping";
- test2 = "test";
- test3 = "object";
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test3, test1, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=UserManagement,*");
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java b/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java
deleted file mode 100644
index 29c4db30a5..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.commands.objects;
-
-import javax.management.MBeanServerConnection;
-
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.Connector;
-import org.apache.qpid.ConnectorFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestVirtualHostObject
-{
- Connector conn;
- MBeanServerConnection mbsc;
- VirtualHostObject test;
- String test1, test2, test3;
-
- @Before
- public void startup() throws Exception
- {
- conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
- ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
- mbsc = conn.getMBeanServerConnection();
- test = new VirtualHostObject(mbsc);
- test1 = "ping";
- test2 = "test";
- test3 = "object";
-
- }
-
- @Test
- public void TestSetQueryString()
- {
- test.setQueryString(test3, test1, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, test2);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,*");
- test.querystring = null;
- test.setQueryString(test3, test1, test2);
- Assert.assertEquals(test.querystring,
- "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,name=ping,*");
- test.querystring = null;
- test.setQueryString(test3, null, null);
- Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,*");
-
- }
-
- @After
- public void cleanup()
- {
- try
- {
- conn.getConnector().close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java b/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java
deleted file mode 100644
index e2a03f52ad..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.utils;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommandLineOption
-{
- String input1;
- String input2;
- String options;
- String[] list;
- CommandLineOption option;
-
- @Before
- public void setup()
- {
- input1 = "-h";
- input2 = "--help";
- options = "localhost testing";
- list = options.split(" ");
- option = new CommandLineOption(input1, list);
-
- }
-
- @Test
- public void TestGetOptinValue()
- {
- Assert.assertEquals(option.getOptionValue(), "localhost");
- }
-
- @Test
- public void TestGetOptionType()
- {
- Assert.assertEquals(option.getOptionType(), "h");
- }
-
- @After
- public void cleanup()
- {
- option = null;
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java b/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java
deleted file mode 100644
index 964c350fc5..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.utils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestCommandLineOptionParser
-{
- CommandLineOptionParser parser;
- String[] input;
- CommandLineOption option1;
- CommandLineOption option2;
- ArrayList list1;
- ArrayList list2;
-
- @Before
- public void setup()
- {
- String temp = "run -h localhost -p 23232";
- input = temp.split(" ");
- parser = new CommandLineOptionParser(input);
- list1 = new ArrayList();
- list2 = new ArrayList();
- }
-
- @Test
- public void TestParse()
- {
- Map hash = new HashMap();
-
- list1.add("localhost");
- list2.add("23232");
- option1 = new CommandLineOption("h", list1);
- option2 = new CommandLineOption("p", list2);
- hash.put("h", option1);
- hash.put("p", option2);
- option1 = (CommandLineOption) parser.parse(input).get("h");
- Assert.assertEquals(option1.getOptionType(), "h");
- Assert.assertEquals(option1.getOptionValue(), "localhost");
- option1 = (CommandLineOption) parser.parse(input).get("p");
- Assert.assertEquals(option1.getOptionType(), "p");
- Assert.assertEquals(option1.getOptionValue(), "23232");
- Assert.assertEquals(parser.parse(input).size(), hash.size());
- }
-
- @After
- public void cleanup()
- {
- parser = null;
- option1 = null;
- option2 = null;
-
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfigProperty.java b/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfigProperty.java
deleted file mode 100644
index 20234d1153..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfigProperty.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.utils;
-
-public class TestJMXConfigProperty
-{
-
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfiguration.java b/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfiguration.java
deleted file mode 100644
index 40cde00953..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXConfiguration.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.utils;
-
-import java.util.ArrayList;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestJMXConfiguration
-{
- CommandLineOptionParser clop;
- JMXConfiguration jmc;
- CommandLineOption option;
- String[] input;
-
- @Before
- public void setup()
- {
- String temp = "command -h 127.0.0.1 -p 1234";
- input = temp.split(" ");
- clop = new CommandLineOptionParser(input);
- jmc = new JMXConfiguration(clop.getAlloptions());
- }
-
- @Test
- public void TestLoadOption()
- {
- ArrayList list = new ArrayList();
- list.add("127.0.0.1");
- option = new CommandLineOption("-h", list);
- CommandLineOption expect = jmc.loadoption("h", clop.getAlloptions());
- Assert.assertEquals(expect.getOptionType(), option.getOptionType());
- Assert.assertEquals(expect.getOptionValue(), option.getOptionValue());
- }
-
- @After
- public void cleanup()
- {
- clop = null;
- jmc = null;
- option = null;
- }
-}
diff --git a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXinfo.java b/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXinfo.java
deleted file mode 100644
index aae39bcb37..0000000000
--- a/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestJMXinfo.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-package org.apache.qpid.utils;
-
-public class TestJMXinfo
-{
- /*
- * this class is having only three simple getter methods. Therefore no
- * testcases
- */
-}