[jboss-cvs] JBossAS SVN: r70045 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 22 16:55:08 EST 2008


Author: scott.stark at jboss.org
Date: 2008-02-22 16:55:08 -0500 (Fri, 22 Feb 2008)
New Revision: 70045

Modified:
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
Validate that the component name matches the JNDIName property value

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2008-02-22 21:46:46 UTC (rev 70044)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2008-02-22 21:55:08 UTC (rev 70045)
@@ -25,6 +25,9 @@
 import java.util.HashMap;
 import java.io.Serializable;
 import org.jboss.deployers.spi.management.KnownComponentTypes;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
@@ -57,8 +60,12 @@
       Map<String, Serializable> propValues = new HashMap<String, Serializable>();
       String jndiName = getName();
       propValues.put("JNDIName", jndiName);
+      ComponentType type = KnownComponentTypes.JMSDestination.Queue.getType();
       createComponentTest("QueueTemplate", propValues, getName(),
-         KnownComponentTypes.JMSDestination.Queue.getType(), jndiName);
+         type, jndiName);
+      ManagedComponent queue = activeView.getComponent("testCreateQueue", type);
+      assertNotNull(queue);
+      assertEquals("testCreateQueue", queue.getName());
    }
 
    public void testRemoveQueue()
@@ -72,8 +79,12 @@
       Map<String, Serializable> propValues = new HashMap<String, Serializable>();
       String jndiName = getName();
       propValues.put("JNDIName", jndiName);
+      ComponentType type = KnownComponentTypes.JMSDestination.Topic.getType();
       createComponentTest("TopicTemplate", propValues, getName(),
-         KnownComponentTypes.JMSDestination.Topic.getType(), jndiName);
+         type, jndiName);
+      ManagedComponent topic = activeView.getComponent("testCreateTopic", type);
+      assertNotNull(topic);
+      assertEquals("testCreateTopic", topic.getName());
    }
 
    public void testRemoveTopic()




More information about the jboss-cvs-commits mailing list