[jboss-cvs] JBoss Messaging SVN: r6023 - in trunk/tests/jms-tests/src/org/jboss/test/messaging: tools and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 6 10:24:20 EST 2009
Author: jmesnil
Date: 2009-03-06 10:24:20 -0500 (Fri, 06 Mar 2009)
New Revision: 6023
Removed:
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/ServiceConfigHelper.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/jboss/
trunk/tests/jms-tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/util/ServiceDeploymentDescriptorTest.java
Modified:
trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java
Log:
test suite cleanup
* removed dead code
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -256,7 +256,7 @@
System.setProperty("java.naming.factory.initial", getContextFactory());
for (int i = 0; i < getServerCount(); i++)
{
- servers.get(i).startServerPeer(i, null, null, null, false);
+ servers.get(i).startServerPeer(i);
}
//deployAdministeredObjects();
}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -551,34 +551,16 @@
public static void startServerPeer() throws Exception
{
- startServerPeer(0, null, null);
+ startServerPeer(0);
}
/**
* @param serverPeerID - if null, the jboss-service.xml value will be used.
- * @param defaultQueueJNDIContext - if null, the jboss-service.xml value will be used.
- * @param defaultTopicJNDIContext - if null, the jboss-service.xml value will be used.
*/
- public static void startServerPeer(int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext) throws Exception
+ public static void startServerPeer(int serverPeerID) throws Exception
{
- startServerPeer(serverPeerID, defaultQueueJNDIContext, defaultTopicJNDIContext, null);
- }
- /**
- * @param serverPeerID - if null, the jboss-service.xml value will be used.
- * @param defaultQueueJNDIContext - if null, the jboss-service.xml value will be used.
- * @param defaultTopicJNDIContext - if null, the jboss-service.xml value will be used.
- */
- public static void startServerPeer(int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext,
- ServiceAttributeOverrides attrOverrids) throws Exception
- {
-
- servers.get(0).startServerPeer(serverPeerID, defaultQueueJNDIContext,
- defaultTopicJNDIContext, attrOverrids, false);
+ servers.get(0).startServerPeer(serverPeerID);
}
public static void stopServerPeer() throws Exception
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -61,7 +61,6 @@
import org.jboss.messaging.utils.SimpleString;
import org.jboss.test.messaging.tools.ConfigurationHelper;
import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
/**
* @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
@@ -287,11 +286,7 @@
return started;
}
- public synchronized void startServerPeer(int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext,
- ServiceAttributeOverrides attrOverrides,
- boolean clustered) throws Exception
+ public synchronized void startServerPeer(int serverPeerID) throws Exception
{
System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID());
getMessagingServer().start();
@@ -468,18 +463,6 @@
// Protected ------------------------------------------------------------------------------------
- protected void overrideServerPeerConfiguration(MBeanConfigurationElement config,
- int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext) throws Exception
- {
- config.setAttribute("ServerPeerID", Integer.toString(serverPeerID));
- config.setAttribute("DefaultQueueJNDIContext", defaultQueueJNDIContext == null ? "/queue"
- : defaultQueueJNDIContext);
- config.setAttribute("DefaultTopicJNDIContext", defaultTopicJNDIContext == null ? "/topic"
- : defaultTopicJNDIContext);
- }
-
// Private --------------------------------------------------------------------------------------
public MessagingServer getMessagingServer()
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -204,23 +204,11 @@
server.log(level, text);
}
- public void startServerPeer(int serverPeerID, String defaultQueueJNDIContext,
- String defaultTopicJNDIContext, boolean clustered) throws Exception
+ public void startServerPeer(int serverPeerID) throws Exception
{
- startServerPeer(serverPeerID, defaultQueueJNDIContext,
- defaultTopicJNDIContext, null, clustered);
+ server.startServerPeer(serverPeerID);
}
-
- public void startServerPeer(int serverPeerID, String defaultQueueJNDIContext,
- String defaultTopicJNDIContext,
- ServiceAttributeOverrides attrOverrides, boolean clustered)
- throws Exception
- {
- server.startServerPeer(serverPeerID, defaultQueueJNDIContext,
- defaultTopicJNDIContext, attrOverrides, clustered);
- }
-
public void stopServerPeer() throws Exception
{
server.stopServerPeer();
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -87,14 +87,8 @@
/**
* @param serverPeerID - if null, the jboss-service.xml value will be used.
- * @param defaultQueueJNDIContext - if null, the jboss-service.xml value will be used.
- * @param defaultTopicJNDIContext - if null, the jboss-service.xml value will be used.
*/
- void startServerPeer(int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext,
- ServiceAttributeOverrides attrOverrides,
- boolean clustered) throws Exception;
+ void startServerPeer(int serverPeerID) throws Exception;
void stopServerPeer() throws Exception;
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/ServiceConfigHelper.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/ServiceConfigHelper.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/ServiceConfigHelper.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.messaging.tools.container;
-
-import java.net.URL;
-
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
-import org.jboss.test.messaging.tools.jboss.ServiceDeploymentDescriptor;
-
-/**
- * A helper class for loading MBean configuration files.
- *
- * @author <a href="sergey.koshcheyev at jboss.com">Sergey Koshcheyev</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class ServiceConfigHelper
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- /**
- * Load a service deployment descriptor from the specified file on
- * the class path.
- */
- public static ServiceDeploymentDescriptor loadConfigFile(String configFile) throws Exception
- {
- URL url = ServiceConfigHelper.class.getClassLoader().getResource(configFile);
- if (url == null)
- {
- throw new Exception("Cannot find " + configFile + " in the classpath");
- }
-
- return new ServiceDeploymentDescriptor(url);
- }
-
- /**
- * Load the service deployment descriptor from the specified file on
- * the class path and return the configuration element of the specified service.
- */
- public static MBeanConfigurationElement loadServiceConfiguration(String configFile, String serviceName) throws Exception
- {
- ServiceDeploymentDescriptor sdd = loadConfigFile(configFile);
- return getServiceConfiguration(sdd, serviceName);
- }
-
- public static MBeanConfigurationElement getServiceConfiguration(ServiceDeploymentDescriptor descriptor, String serviceName)
- {
- return (MBeanConfigurationElement) descriptor.query("service", serviceName).get(0);
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -1,249 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.util;
-
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.messaging.utils.XMLUtil;
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class MBeanConfigurationElementTest extends MessagingTestCase
-{
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public void setUp() throws Exception
- {
- super.setUp();
- }
-
- public void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public void testMBeanConfiguration_1() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"SomeName\" value=\"SomeValue\"/>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
- assertTrue(mbeanConfig.dependencyOptionalAttributeNames().isEmpty());
-
- Set attributeNames = mbeanConfig.attributeNames();
- assertEquals(1, attributeNames.size());
-
- assertTrue(attributeNames.contains("SomeName"));
-
- assertEquals("SomeValue", mbeanConfig.getAttributeValue("SomeName"));
- }
-
- public void testMBeanConfiguration_2() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"SomeName\">SomeValue</attribute>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
- assertTrue(mbeanConfig.dependencyOptionalAttributeNames().isEmpty());
-
- Set attributeNames = mbeanConfig.attributeNames();
- assertEquals(1, attributeNames.size());
-
- assertTrue(attributeNames.contains("SomeName"));
-
- assertEquals("SomeValue", mbeanConfig.getAttributeValue("SomeName"));
- }
-
- public void testMBeanConfiguration_3() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"SomeName\" value=\"SomeValue\">SomeOtherValue</attribute>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
- assertTrue(mbeanConfig.dependencyOptionalAttributeNames().isEmpty());
-
- Set attributeNames = mbeanConfig.attributeNames();
- assertEquals(1, attributeNames.size());
-
- assertTrue(attributeNames.contains("SomeName"));
-
- assertEquals("SomeValue", mbeanConfig.getAttributeValue("SomeName"));
- }
-
-
- public void testMBeanConfiguration_4() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <depends>somedomain:somekey=somevalue</depends>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
- assertTrue(mbeanConfig.dependencyOptionalAttributeNames().isEmpty());
- assertTrue(mbeanConfig.attributeNames().isEmpty());
- }
-
- public void testMBeanConfiguration_5() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <depends optional-attribute-name=\"SomeName\">somedomain:somekey=somevalue</depends>" +
- "</mbean>";
-
- Element e = XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
- assertTrue(mbeanConfig.attributeNames().isEmpty());
-
- Set optionalAttributeNames = mbeanConfig.dependencyOptionalAttributeNames();
- assertEquals(1, optionalAttributeNames.size());
- assertTrue(optionalAttributeNames.contains("SomeName"));
- assertEquals("somedomain:somekey=somevalue",
- mbeanConfig.getDependencyOptionalAttributeValue("SomeName"));
- }
-
- public void testXMLAttribute() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"xmlattribute\"> " +
- " <something>" +
- " <somethingelse/> " +
- " </something>" +
- " </attribute>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- Set optionalAttributeNames = mbeanConfig.attributeNames();
- assertEquals(1, optionalAttributeNames.size());
- assertTrue(optionalAttributeNames.contains("xmlattribute"));
-
- String attributeValue = mbeanConfig.getAttributeValue("xmlattribute");
-
- Node n = org.jboss.messaging.utils.XMLUtil.stringToElement(attributeValue);
- assertEquals("something", n.getNodeName());
-
- NodeList nl = n.getChildNodes();
- boolean sonethingelseFound = false;
-
- for(int i = 0; i < nl.getLength(); i++)
- {
- Node c = nl.item(i);
- if ("somethingelse".equals(c.getNodeName()))
- {
- sonethingelseFound = true;
- break;
- }
- }
-
- assertTrue(sonethingelseFound);
- }
-
- public void testConstructor() throws Exception
- {
- String s =
- "<mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"xmlattribute\">somevalue</attribute>" +
- " <depends optional-attribute-name=\"SomeDependency\">somedomain:somekey=somevalue</depends>" +
- " <constructor>\n" +
- " <arg type=\"java.lang.String\" value=\"blah\" />\n" +
- " <arg type=\"java.lang.Integer\" value=\"55\" />\n" +
- " <arg type=\"int\" value=\"77\" />\n" +
- " </constructor>" +
- "</mbean>";
-
- Element e = org.jboss.messaging.utils.XMLUtil.stringToElement(s);
- MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
-
- assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
- assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
-
-
- assertEquals(String.class, mbeanConfig.getConstructorArgumentType(0, 0));
- assertEquals("blah", mbeanConfig.getConstructorArgumentValue(0, 0));
-
- assertEquals(Integer.class, mbeanConfig.getConstructorArgumentType(0, 1));
- assertEquals("55", mbeanConfig.getConstructorArgumentValue(0, 1));
-
- assertEquals(Integer.TYPE, mbeanConfig.getConstructorArgumentType(0, 2));
- assertEquals("77", mbeanConfig.getConstructorArgumentValue(0, 2));
-
- // test constructor argument value change
-
- mbeanConfig.setConstructorArgumentValue(0, 0, "xerxex");
- assertEquals("xerxex", mbeanConfig.getConstructorArgumentValue(0, 0));
-
- }
-}
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/util/ServiceDeploymentDescriptorTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/util/ServiceDeploymentDescriptorTest.java 2009-03-06 15:18:04 UTC (rev 6022)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/util/ServiceDeploymentDescriptorTest.java 2009-03-06 15:24:20 UTC (rev 6023)
@@ -1,87 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.util;
-
-import java.util.List;
-
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
-import org.jboss.test.messaging.tools.jboss.ServiceDeploymentDescriptor;
-
-/**
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class ServiceDeploymentDescriptorTest extends MessagingTestCase
-{
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public void setUp() throws Exception
- {
- super.setUp();
- }
-
- public void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public void testServiceConfiguration() throws Exception
- {
- String s =
- "<service> " +
- " <mbean name=\"somedomain:service=SomeService\"" +
- " code=\"org.example.SomeClass\"" +
- " xmbean-dd=\"xmdesc/somefile.xml\">" +
- " <attribute name=\"SomeName\" value=\"SomeValue\"/>" +
- " </mbean>" +
- " <mbean name=\"someotherdomain:somekey=somevalue\"" +
- " code=\"org.example.SomeClass\"/>" +
- "</service>";
-
- ServiceDeploymentDescriptor sdd = new ServiceDeploymentDescriptor(s);
-
- List list;
-
- list = sdd.query("service", "SomeService");
- assertEquals(1, list.size());
- MBeanConfigurationElement e = (MBeanConfigurationElement)list.get(0);
- assertNotNull(e);
-
- list = sdd.query("somekey", "somevalue");
- assertEquals(1, list.size());
- e = (MBeanConfigurationElement)list.get(0);
- assertNotNull(e);
-
- list = sdd.query("somekey", "nothing");
- assertTrue(list.isEmpty());
-
- list = sdd.query("nosuchkey", "somevalue");
- assertTrue(list.isEmpty());
-
- }
-
-}
More information about the jboss-cvs-commits
mailing list