[jbosstools-commits] JBoss Tools SVN: r6374 - in trunk/esb/tests/org.jboss.tools.esb.core.test: META-INF and 10 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Feb 18 06:07:36 EST 2008
Author: scabanovich
Date: 2008-02-18 06:07:36 -0500 (Mon, 18 Feb 2008)
New Revision: 6374
Added:
trunk/esb/tests/org.jboss.tools.esb.core.test/.classpath
trunk/esb/tests/org.jboss.tools.esb.core.test/.cvsignore
trunk/esb/tests/org.jboss.tools.esb.core.test/.project
trunk/esb/tests/org.jboss.tools.esb.core.test/META-INF/
trunk/esb/tests/org.jboss.tools.esb.core.test/META-INF/MANIFEST.MF
trunk/esb/tests/org.jboss.tools.esb.core.test/about.html
trunk/esb/tests/org.jboss.tools.esb.core.test/ant.properties
trunk/esb/tests/org.jboss.tools.esb.core.test/build.properties
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/.project
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-fs.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-ftp.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-hibernate.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jbr.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jms.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-sql.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/src/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBAllTests.java
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
JBIDE-1670
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/.classpath
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/.classpath (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/.classpath 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/.cvsignore
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/.cvsignore (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/.cvsignore 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1 @@
+bin
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/.project (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/.project 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.esb.core.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/META-INF/MANIFEST.MF 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ESB Core Tests Plug-in
+Bundle-SymbolicName: org.jboss.tools.esb.core.test;singleton:=true
+Bundle-Version: 2.0.0
+Bundle-ClassPath: esb-core-tests.jar
+Bundle-Vendor: Red Hat, Inc.
+Export-Package: org.jboss.tools.esb.core.test
+Require-Bundle:
+ org.junit,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.jboss.tools.common.model,
+ org.jboss.tools.esb.core,
+ org.jboss.tools.common.test,
+ org.eclipse.wst.common.project.facet.core,
+ org.jboss.tools.tests,
+ org.eclipse.ui.workbench,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.jface,
+ org.jboss.tools.jst.firstrun,
+ org.eclipse.wst.server.core,
+ org.eclipse.datatools.connectivity
+Provide-Package: org.jboss.tools.esb.core.test
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/about.html
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/about.html (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/about.html 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/ant.properties
===================================================================
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/build.properties
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/build.properties (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/build.properties 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,13 @@
+bin.includes = META-INF/,\
+ esb-core-tests.jar,\
+ projects/,\
+ about.html,\
+ ant.properties
+src.includes = META-INF/,\
+ ant.properties,\
+ build.properties,\
+ src/,\
+ projects/,\
+ about.html
+source.esb-core-tests.jar = src/
+jars.compile.order = esb-core-tests.jar
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/.project (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/.project 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-fs.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-fs.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-fs.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,70 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5" >
+
+ <providers>
+ <fs-provider name="FSprovider1">
+ <fs-bus busid="helloFileChannel" >
+ <fs-message-filter
+ directory="@INPUTDIR@"
+ input-suffix=".dat"
+ work-suffix=".esbWorking"
+ post-delete="false"
+ post-directory="@OUTPUTDIR@"
+ post-suffix=".sentToEsb"
+ error-delete="false"
+ error-directory="@ERRORDIR@"
+ error-suffix=".IN_ERROR"
+ />
+ </fs-bus>
+ </fs-provider>
+
+ <jms-provider name="JBossMessaging"
+ connection-factory="ConnectionFactory"
+ >
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_file_esb"
+ selector="type='fromHelloworldFileAction'"
+ />
+ </jms-bus>
+
+ </jms-provider>
+
+ </providers>
+
+ <services>
+
+ <service
+ category="myCategory"
+ name="myFileListener"
+ description="Hello World File Action (esb listener)" >
+ <listeners>
+ <fs-listener name="FileGateway"
+ busidref="helloFileChannel"
+ maxThreads="1"
+ is-gateway="true"
+ poll-frequency-seconds="10"
+ />
+ <jms-listener name="helloWorldFileAction"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="testAction" class="org.jboss.soa.esb.actions.SystemPrintln" />
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.helloworldfileaction.MyAction"
+ process="displayMessage,playWithMessage"
+ />
+ <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="true"/>
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile" />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-ftp.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-ftp.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-ftp.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,68 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <ftp-provider name="FTPprovider" hostname="@FTP_HOSTNAME@" >
+ <ftp-bus busid="helloFTPChannel" >
+ <ftp-message-filter
+ username="@FTP_USERNAME@"
+ password="@FTP_PASSWORD@"
+ read-only="true"
+ passive="false"
+ directory="@FTP_DIRECTORY@"
+ input-suffix=".dat"
+ work-suffix=".esbWorking"
+ post-delete="false"
+ post-suffix=".COMPLETE"
+ error-delete="false"
+ error-suffix=".HAS_ERROR"
+ />
+ </ftp-bus>
+ </ftp-provider>
+
+ <jms-provider name="JBossMQ"
+ connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost" >
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_ftp_esb"
+ selector="source='fromHelloworldFTPAction'"
+ />
+ </jms-bus>
+
+ </jms-provider>
+
+ </providers>
+
+ <services>
+ <service
+ category="myCategory"
+ name="myFileListener"
+ description="Hello World File Action (esb listener)" >
+ <listeners>
+ <ftp-listener name="FtpGateway"
+ busidref="helloFTPChannel"
+ maxThreads="1"
+ is-gateway="true"
+ schedule-frequency="5">
+ <property name="remoteFileSystemStrategy-configFile" value="/ftpfile-cache-config.xml"/>
+ <property name="remoteFileSystemStrategy-cacheListener" value="org.jboss.soa.esb.listeners.gateway.remotestrategies.cache.DeleteOnEvictTreeCacheListener"/>
+ </ftp-listener>
+ <jms-listener name="helloWorldFileAction"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.helloworldftpaction.MyAction"
+ process="displayMessage,playWithMessage"
+ />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-hibernate.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-hibernate.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-hibernate.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,55 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <hibernate-provider name="Hibernateprovider"
+ hibernate-cfg-file="hibernate.cfg.xml">
+ <hibernate-bus busid="helloHibernateChannel" >
+ <hibernate-message-filter
+ classname="org.jboss.soa.esb.samples.quickstart.hibernateaction.Order"
+ event="onLoad,onDelete"/>
+ </hibernate-bus>
+ </hibernate-provider>
+
+ <jms-provider name="JBossMQ"
+ connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost" >
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/A"
+ selector="source='fromHelloworldHibernateAction'"
+ />
+ </jms-bus>
+
+ </jms-provider>
+
+ </providers>
+
+ <services>
+ <service
+ category="myCategory"
+ name="myJmsListener"
+ description="Hello World Hibernate Action (esb hibernate listener)">
+ <listeners>
+ <hibernate-listener name="HibernateGateway"
+ busidref="helloHibernateChannel"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jms-listener name="helloWorldJmsAction"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.hibernateaction.MyAction"
+ process="displayMessage"
+ />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jbr.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jbr.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jbr.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+ parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_wss_esb"/>
+ </jms-bus>
+ </jms-provider>
+
+ <jbr-provider name="JBR-Http" protocol="http" host="localhost">
+ <jbr-bus busid="Http-1" port="9876" />
+ </jbr-provider>
+
+ </providers>
+
+ <services>
+
+ <service category="MyServiceCategory" name="MyWssService" description="WS Frontend speaks natively to the ESB">
+
+ <listeners>
+ <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/>
+
+ <jms-listener name="JMS-ESBListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_wssecurity] Message before invoking jbossws endpoint"/>
+ </action>
+ <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+ <property name="jbossws-endpoint" value="HelloService"/>
+ </action>
+ <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_wssecurity] Message after invoking jbossws endpoint"/>
+ </action>
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jms.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jms.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-jms.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,114 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_file_notifier_Request_gw"
+ />
+ </jms-bus>
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_file_notifier_Request_esb"
+ />
+ </jms-bus>
+
+ <jms-bus busid="quickstartFileChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_file_notifier_file_gw"
+ />
+ </jms-bus>
+
+ <jms-bus busid="quickstartConsoleChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_file_notifier_console_gw"
+ />
+ </jms-bus>
+
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="SimpleListener"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
+ <property name="destinations">
+ <route-to service-category="routerToDisplay" service-name="DisplayRouterListener" />
+ <route-to service-category="routerToFile" service-name="FileRouterListener" />
+ </property>
+ </action>
+ </actions>
+ </service>
+ <service
+ category="routerToDisplay"
+ name="DisplayRouterListener"
+ description="Static route display destination">
+ <listeners>
+ <jms-listener name="helloWorldconsole"
+ busidref="quickstartConsoleChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.helloworldfilenotifier.MyJMSListenerAction"
+ process="displayMessage"
+ />
+ </actions>
+ </service>
+ <service
+ category="routerToFile"
+ name="FileRouterListener"
+ description="Static route file destination">
+ <listeners>
+ <jms-listener name="helloWorldfile"
+ busidref="quickstartFileChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+ <property name="okMethod" value="notifyOK" />
+ <property name="notification-details">
+ <NotificationList type="ok">
+ <target class="NotifyConsole"/>
+ <target class="NotifyFiles">
+ <file append="false" URI="@results.dir@/results.log"/>
+ </target>
+ </NotificationList>
+ <NotificationList type="err">
+ <target class="NotifyConsole"/>
+ <target class="NotifyFiles">
+ <file append="false" URI="@results.dir@/results.log"/>
+ </target>
+ </NotificationList>
+ </property>
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-sql.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-sql.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.0.1/jboss-esb-sql.xml 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,66 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <sql-provider name="SQLprovider"
+ url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="org.hsqldb.jdbcDriver"
+ username="sa"
+ password="">
+ <sql-bus busid="helloSQLChannel" >
+ <sql-message-filter
+ tablename="GATEWAY_TABLE"
+ status-column="STATUS_COL"
+ order-by="DATA_COLUMN"
+ where-condition="DATA_COLUMN like 'data%'"
+
+ message-id-column="UNIQUE_ID"
+ />
+ </sql-bus>
+ </sql-provider>
+
+ <jms-provider name="JBossMQ"
+ connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost" >
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/A"
+ selector="source='fromHelloworldSQLAction'"
+ />
+ </jms-bus>
+
+ </jms-provider>
+
+ </providers>
+
+ <services>
+ <service
+ category="myCategory"
+ name="myJmsListener"
+ description="Hello World SQL Action (esb jdbc listener)">
+ <listeners>
+ <sql-listener name="SqlGateway"
+ busidref="helloSQLChannel"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jms-listener name="helloWorldJmsAction"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.helloworldsqlaction.MyAction"
+ process="displayMessage"
+ />
+ <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln" />
+ </actions>
+
+ </service>
+ </services>
+
+</jbossesb>
+
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBAllTests.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBAllTests.java (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBAllTests.java 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.esb.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class ESBAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test ESB model");
+ suite.addTestSuite(ESBModelTest.class);
+ return suite;
+ }
+
+}
Added: 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 (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2008-02-18 11:07:36 UTC (rev 6374)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.esb.core.test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+import junit.framework.TestCase;
+
+public class ESBModelTest extends TestCase {
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = true;
+
+ public ESBModelTest() {}
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.esb.core.test", null, "Test", false);
+ project = provider.getProject();
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+/*
+ public void testPaths() {
+ IModelNature n = EclipseResourceUtil.getModelNature(project);
+ String testName = "ESBModelTest:testPaths";
+ ArrayList<TestDescription> tests = provider.getTestDescriptions(testName);
+ System.out.println(testName + " " + (tests == null ? -1 : tests.size()));
+ StringBuffer sb = new StringBuffer();
+ int errorCount = 0;
+ if(tests != null) for (int i = 0; i < tests.size(); i++) {
+ TestDescription t = tests.get(i);
+ String path = t.getProperty("path");
+ XModelObject o = n.getModel().getByPath(path);
+ if(o == null) {
+ sb.append(path).append("\n");
+ errorCount++;
+ }
+ }
+ assertTrue("Cannot find objects at " + errorCount + " paths\n" + sb.toString(), errorCount == 0);
+ }
+*/
+
+ public void testJMSExample() {
+ IFile f = project.getFile(new Path("esb-1.0.1/jboss-esb-jms.xml"));
+ assertTrue("Cannot find jboss-esb-jms.xml", f != null);
+ XModelObject object = EclipseResourceUtil.createObjectForResource(f);
+ assertTrue("Cannot create model for jboss-esb-jms.xml", object != null);
+ assertTrue("Wrong entity for jboss-esb-jms.xml", ESBConstants.ENT_ESB_FILE_101.equals(object.getModelEntity().getName()));
+
+ StringBuffer errorList = new StringBuffer();
+ checkAttributeValue(object,
+ "Providers/JBossMQ",
+ "connection factory",
+ "ConnectionFactory",
+ errorList);
+ checkAttributeValue(object,
+ "Providers/JBossMQ/quickstartGwChannel/Filter",
+ "dest name",
+ "queue/quickstart_helloworld_file_notifier_Request_gw",
+ errorList);
+ checkAttributeValue(object,
+ "Services/FileRouterListener/Actions/notificationAction/notification-details/NotificationList1",
+ "tag",
+ "NotificationList",
+ errorList);
+
+ assertTrue(errorList.toString(), errorList.length() == 0);
+ }
+
+ protected boolean checkAttributeValue(XModelObject object, String path, String attribute, String testValue, StringBuffer errorList) {
+ XModelObject child = object.getChildByPath(path);
+ if(child == null) {
+ errorList.append("Cannot find object at " + path).append("\n");
+ return false;
+ }
+ if(child.getModelEntity().getAttribute(attribute) == null) {
+ errorList.append("Attribute " + attribute + " is not found in object " + path).append("\n");
+ return false;
+ }
+ String realValue = child.getAttributeValue(attribute);
+ if(realValue == null || !realValue.equals(testValue)) {
+ errorList.append("Attribute " + attribute + " in object " + path + " has unexpected value '" + realValue + "'").append("\n");
+ return false;
+ }
+
+ return true;
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+}
More information about the jbosstools-commits
mailing list