[jbosstools-commits] JBoss Tools SVN: r21949 - in trunk/esb/tests/org.jboss.tools.esb.core.test: projects/Test/esb-1.2 and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri May 7 06:20:47 EDT 2010


Author: scabanovich
Date: 2010-05-07 06:20:47 -0400 (Fri, 07 May 2010)
New Revision: 21949

Added:
   trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/
   trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
Modified:
   trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6260

Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml	                        (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml	2010-05-07 10:20:47 UTC (rev 21949)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+ <globals>
+  <war-security domain="bb" method="DIGEST"/>
+ </globals>
+ <services>
+  <service category="c" description="d" name="s">
+   <actions mep="RequestResponse">
+    <action class="org.jboss.soa.esb.actions.Notifier" name="SendResponseNotifier">
+     <property name="okMethod" value="notifyOK"/>
+     <property name="exceptionMethod" value="notifyError"/>
+     <property name="destinations">
+      <NotificationList type="err">
+       <target class="NotifyQueues">
+        <queue jndiName="queue/MincomJMS_reply"/>
+       </target>
+      </NotificationList>
+      <NotificationList type="ok">
+       <target class="NotifyQueues">
+        <queue jndiName="queue/MincomJMS_reply"/>
+       </target>
+      </NotificationList>
+     </property>
+    </action>
+   </actions>
+  </service>
+ </services>
+</jbossesb>


Property changes on: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java	2010-05-07 10:08:52 UTC (rev 21948)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java	2010-05-07 10:20:47 UTC (rev 21949)
@@ -250,13 +250,39 @@
 		assertTrue(errorList.toString(), errorList.length() == 0);
 	}
 
+	public void testNotifiers() {
+		XModelObject object = getFileObject("esb-1.2", "jboss-esb-notifiers.xml", ESBConstants.ENT_ESB_FILE_120);
+		
+		StringBuffer errorList = new StringBuffer();
+		
+		String sendResponseNotifierPath = "Services/s/Actions/SendResponseNotifier";
+		
+		String[][] sendResponseNotifierAttrValues = {
+			{"name", "SendResponseNotifier"},
+			{"ok method", "notifyOK"},
+			{"exception method", "notifyError"},
+		};
+		checkAttributes(object, sendResponseNotifierPath, sendResponseNotifierAttrValues, errorList);
 
+		String errQueuePath = sendResponseNotifierPath + "/err/NotifyQueues/queue#MincomJMS_reply";
+		String[][] errQueueAttrValues = {
+				{"jndi name", "queue/MincomJMS_reply"},
+		};
+		checkAttributes(object, errQueuePath, errQueueAttrValues, errorList);
+
+		assertTrue(errorList.toString(), errorList.length() == 0);
+	}
+
 	XModelObject getFileObject(String parentPath, String xmlname) {
+		return getFileObject(parentPath, xmlname, ESBConstants.ENT_ESB_FILE_101);
+	}
+
+	XModelObject getFileObject(String parentPath, String xmlname, String entity) {
 		IFile f = project.getFile(new Path(parentPath + "/" + xmlname));
 		assertTrue("Cannot find " + xmlname, f != null);
 		XModelObject object = EclipseResourceUtil.createObjectForResource(f);
 		assertTrue("Cannot create model for " + xmlname, object != null);
-		assertTrue("Wrong entity for " + xmlname, ESBConstants.ENT_ESB_FILE_101.equals(object.getModelEntity().getName()));
+		assertTrue("Wrong entity for " + xmlname, entity.equals(object.getModelEntity().getName()));
 		return object;
 	}
 



More information about the jbosstools-commits mailing list