Author: lzoubek(a)redhat.com
Date: 2011-01-07 11:38:51 -0500 (Fri, 07 Jan 2011)
New Revision: 27987
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
Log:
added project-examples bot tests covering all esb examples
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2011-01-07
16:36:41 UTC (rev 27986)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -11,17 +11,31 @@
package org.jboss.tools.esb.ui.bot.tests;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorld;
+import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldAction;
+import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldFileAction;
+import org.jboss.tools.esb.ui.bot.tests.examples.SmooksCSV2XML;
+import org.jboss.tools.esb.ui.bot.tests.examples.SmooksXML2XMLSimple;
+import org.jboss.tools.esb.ui.bot.tests.examples.SmooksXML2XMLDateManipulation;
+import org.jboss.tools.esb.ui.bot.tests.examples.WebServiceConsumer1;
+import org.jboss.tools.esb.ui.bot.tests.examples.WebServiceProducer;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@SuiteClasses({
- CreateRuntimeFromESB.class,
- CreateRuntimeFromSOA.class,
- NewProjectUsingRuntime.class,
- NewProjectUsingBundledInEAP.class,
- Editing.class,
- HelloWorld.class,
+ //CreateRuntimeFromESB.class,
+ //CreateRuntimeFromSOA.class,
+ //NewProjectUsingRuntime.class,
+ //NewProjectUsingBundledInEAP.class,
+ //Editing.class,
+ HelloWorld.class,
+ HelloWorldAction.class,
+ HelloWorldFileAction.class,
+ WebServiceConsumer1.class,
+ WebServiceProducer.class,
+ SmooksCSV2XML.class,
+ SmooksXML2XMLDateManipulation.class,
+ SmooksXML2XMLSimple.class
})
@RunWith(RequirementAwareSuite.class)
public class ESBAllBotTests {
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2011-01-07
16:36:41 UTC (rev 27986)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -1,17 +1,136 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.ExampleTest;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
-public class ESBExampleTest extends SWTTestExt{
+public class ESBExampleTest extends ExampleTest{
+
+ @Override
+ public String getExampleCategory() {
+ return getRunningSoaVersionTreeLabel();
+ }
+ /**
+ * called after example projects are imported, by default fixes both example project
references and (if defined) client example references
+ */
+ @Override
+ protected void postImport() {
+ fixExampleLibs();
+ if (getExampleClientProjectName()!=null) {
+ fixExampleClientLibs();
+ }
+ openESBConfig();
+ assertProblemsView();
+ }
+ /**
+ * opens up ESB config file contained in example project in ESB Editor
+ */
+ protected void openESBConfig() {
+ String[] config =
{getExampleProjectName(),"esbcontent","META-INF","jboss-esb.xml"};
+ assertTrue("ESB config file does not
exist",projectExplorer.existsResource(config));
+ SWTBotEditor editor = projectExplorer.openFile(getExampleProjectName(),
"esbcontent","META-INF","jboss-esb.xml");
+ assertNotNull("No editor was opened", editor);
+ assertEquals("Wrong editor was opened", "jboss-esb.xml",
editor.getTitle());
+ editor.close();
+ }
+ /**
+ * executes (deploys) example project
+ */
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ packageExplorer.runOnServer(getExampleProjectName());
+ util.waitForNonIgnoredJobs();
+ }
+ /**
+ * executes given class in given project (path must include project name)
+ * @param path clientClass as could be seen in package explorer (e.g src,
org.jboss.tools.test.Class.java)
+ * @return string in server log console that was appended or null if nothing appended
+ */
+ protected String executeClientGetServerOutput(String... clientClass) {
+ String text = console.getConsoleText();
+ SWTBotTreeItem jmsCall =
SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),clientClass);
+ eclipse.runTreeItemAsJavaApplication(jmsCall);
+ bot.sleep(Timing.time5S());
+ console.switchConsole(configuredState.getServer().name);
+ String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
+ if (text.length()>=text2.length()) {
+ return null;
+ }
+ return text2.substring(text.length());
+ }
+ /**
+ * executes given class in given project (path must include project name)
+ * @param path clientClass as could be seen in package explorer (e.g src,
org.jboss.tools.test.Class.java)
+ * @return string in log console that was appended
+ */
+ protected String executeClient(String... clientClass) {
+ SWTBotTreeItem jmsCall =
SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),clientClass);
+ eclipse.runTreeItemAsJavaApplication(jmsCall);
+ bot.sleep(Timing.time5S());
+ String text = console.getConsoleText(TIME_5S, TIME_20S, false);
+ console.switchConsole(configuredState.getServer().name); // switch console back for
sure
+ return text;
+ }
+ /**
+ * executes given class in given project (path must include project name)
+ * @param className full name of class to run
+ * @param arguments arguments that should be passed to classes main method (can be
null)
+ * @return string in server log that was appended or null if nothing appended
+ */
+ protected String executeClientGetServerOutput(String className, String arguments) {
+ String text = console.getConsoleText();
+ eclipse.runJavaApplication(getExampleClientProjectName(), className, arguments);
+ bot.sleep(Timing.time5S());
+ console.switchConsole(configuredState.getServer().name);
+ String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
+ if (text.length()>=text2.length()) {
+ return null;
+ }
+ return text2.substring(text.length());
+ }
+ protected void fixJREToWorkspaceDefault(String project) {
+ SWTBotTree tree = projectExplorer.show().bot().tree();
+ SWTBotTreeItem proj = tree.select(project).getTreeItem(project);
+ for (SWTBotTreeItem item : proj.getItems()) {
+ if (item.getText().startsWith("JRE System")) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.PROPERTIES,
false)).click();
+ SWTBotShell shell = bot.activeShell();
+ shell.bot().radio(2).click();
+ open.finish(shell.bot(),IDELabel.Button.OK);
+ break;
+ }
+ }
+
+ }
+ protected void fixExampleLibs() {
+ fixLibrary(getExampleProjectName(),"Server Library");
+ fixLibrary(getExampleProjectName(),"JBoss ESB Runtime");
+ util.waitForNonIgnoredJobs();
+ }
+ protected void fixExampleClientLibs() {
+ fixLibrary(getExampleClientProjectName(),"Server Library");
+ fixLibrary(getExampleClientProjectName(),"JBoss ESB Runtime");
+ fixJREToWorkspaceDefault(getExampleClientProjectName());
+ util.waitForNonIgnoredJobs();
+ }
+ protected void assertProblemsView() {
+ SWTBotTreeItem errors = ProblemsView.getErrorsNode(bot);
+ assertNull("Project still contain problems
:"+SWTEclipseExt.getFormattedTreeNode(errors),errors);
+ }
protected void fixLibrary(String project, String lib) {
SWTBotTree tree = projectExplorer.show().bot().tree();
SWTBotTreeItem proj = tree.select(project).getTreeItem(project);
+ proj.expand();
boolean fixed=false;
boolean found=false;
for (SWTBotTreeItem item : proj.getItems()) {
@@ -30,6 +149,9 @@
log.error("Libray starting with '"+lib+"' in project
'"+project+"' was not fixed.");
bot.sleep(Long.MAX_VALUE);
}
+ if (!found) {
+ log.info("Libray starting with '"+lib+"' in project
'"+project+"' was not found.");
+ }
}
/**
* gets label in project examples tree derived by version of soa we currently run
@@ -37,6 +159,9 @@
*/
protected String getRunningSoaVersionTreeLabel() {
String ret = "ESB for SOA-P ";
+ if (!configuredState.getServer().isConfigured) {
+ throw new NullPointerException("No server was configured for test, but it is
required");
+ }
if (configuredState.getServer().version.equals("5.0")) {
ret+="5.0";
}
@@ -45,11 +170,9 @@
}
else if (configuredState.getServer().version.equals("4.3")) {
ret+="4.3";
- if (jbt.isJBDSRun()) {
- return "ESB";
- }
}
else {
+ assertNotNull("We are running on unexpected SOA-P version
"+configuredState.getServer().version+" update test source code
"+this.getClass().getName(), null);
return null;
}
return ret;
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2011-01-07
16:36:41 UTC (rev 27986)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -1,94 +1,40 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
-import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JBossToolsProjectExamples;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.AfterClass;
-import org.junit.Test;
@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
public class HelloWorld extends ESBExampleTest {
-
- String projectName="helloworld";
- String projectClientName="helloworld_client";
-
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB HelloWorld Example - ESB";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "helloworld";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "helloworld_testclient";
+ }
@AfterClass
public static void waitaminute() {
- // bot.sleep(Long.MAX_VALUE);
+ //bot.sleep(Long.MAX_VALUE);
}
- @Test
- public void helloWorldExample() {
- String soaNode = getRunningSoaVersionTreeLabel();
- assertNotNull("We are running on unexpected SOA-P version
"+configuredState.getServer().version+" update test source code
"+this.getClass().getName(), soaNode);
- createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB",
"helloworld", null, "helloworld_testclient");
- }
-
- /**
- * creates example
- * @param soaNode first treenode name on projectExamples dialog
- * @param exampleName name of example node
- * @param projectName projectname that will be generated by example
- * @param exampleClientName name of example client example (when null, client project is
assumed to be together with example)
- * @param projectClientName name of client project that will be generated by example (or
client example)
- */
- private void createHelloWorldExample(String soaNode, String exampleName,String
projectName, String exampleClientName, String projectClientName) {
- SWTBot wiz = open.newObject(JBossToolsProjectExamples.LABEL);
- SWTBotTree tree = wiz.tree();
- tree.expandNode(soaNode).select(exampleName);
- assertTrue(wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_NAME).getText().equals(projectName));
- wiz.button(IDELabel.Button.FINISH).click();
- SWTBotShell shell = bot.shell("Downloading...");
- shell.activate();
- bot.waitUntil(shellCloses(shell),Timing.time100S());
- shell = bot.shell("Quick Fix");
- shell.activate();
- open.finish(shell.bot());
- assertTrue(projectExplorer.existsResource(projectName));
- assertTrue(projectExplorer.existsResource(projectName,"esbcontent","META-INF","jboss-esb.xml"));
- if (exampleClientName!=null) {
- wiz = open.newObject(JBossToolsProjectExamples.LABEL);
- tree = wiz.tree();
- tree.expandNode(soaNode).select(exampleClientName);
- assertTrue(wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_NAME).getText().equals(projectClientName));
- wiz.button(IDELabel.Button.FINISH).click();
- shell = bot.shell("Downloading...");
- shell.activate();
- bot.waitUntil(shellCloses(shell),Timing.time100S());
- shell = bot.shell("Quick Fix");
- shell.activate();
- open.finish(shell.bot());
- }
- assertTrue(projectExplorer.existsResource(projectClientName));
- fixLibrary(projectName,"Server Library");
- fixLibrary(projectClientName,"Server Library");
- fixLibrary(projectName,"JBoss ESB Runtime");
- fixLibrary(projectClientName,"JBoss ESB Runtime");
- util.waitForNonIgnoredJobs();
- SWTBotTreeItem errors = problems.getErrorsNode(bot);
- //assertTrue("Project still contain problems
:"+eclipse.getFormattedTreeNodesText(problems.show().bot().tree(),
errors.getItems()),errors==null);
- packageExplorer.runOnServer(projectName);
- util.waitForNonIgnoredJobs();
- String text = console.getConsoleText();
- SWTBotTreeItem jmsCall =
SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),projectClientName,"src","org.jboss.soa.esb.samples.quickstart.helloworld.test","SendJMSMessage.java");
- eclipse.runTreeItemAsJavaApplication(jmsCall);
- bot.sleep(Timing.time5S());
- console.switchConsole(configuredState.getServer().name);
- String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
- assertTrue("Calling JMS Send message failed, nothing appened to server
log",text.length()<text2.length());
- String diff = text2.substring(text.length());
- assertTrue("Calling JMS Send message failed, unexpected server output
:"+diff,diff.contains("Body: Hello World"));
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.helloworld.test","SendJMSMessage.java");
+ assertNotNull("Calling JMS Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Body: Hello World"));
+ text = null;
+ text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.helloworld.test","SendEsbMessage.java");
+ assertNotNull("Calling ESB Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling ESB Send message failed, unexpected server output
:"+text,text.contains("hello world esb"));
}
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java 2011-01-07
16:36:41 UTC (rev 27986)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -1,5 +1,30 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
public class HelloWorldAction extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB HelloWorld Action Example - ESB";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "helloworld_action";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "helloworld_action_client";
+ }
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.helloworldaction.test","SendJMSMessage.java");
+ assertNotNull("Calling JMS Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Hello World Action ESB invoked!"));
+ }
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2011-01-07
16:36:41 UTC (rev 27986)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -1,5 +1,26 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
public class HelloWorldFileAction extends ESBExampleTest {
-
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB HelloWorld File Action Example - ESB";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "helloworld_file_action";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "helloworld_file_action_client";
+ }
+ @Override
+ protected void executeExample() {
+ fail("Example execution not yet implemented");
+ }
}
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,30 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
+public class SmooksCSV2XML extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Smooks CSV->XML Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "transform_CSV2XML";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "transform_CSV2XML_client";
+ }
+
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformcsv2xml","SendJMSMessage.java");
+ assertNotNull("Calling Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("<csv-set>"));
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,34 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
+public class SmooksXML2POJO extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Smooks XML->POJO Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "transform_XML2POJO";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "transform_XML2POJO_client";
+ }
+
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2pojo.test","SendJMSMessage.java");
+ bot.sleep(Timing.time3S());
+ assertNotNull("Calling Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Order Items"));
+ text =
executeClient(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2pojo.test","ReceiveJMSMessage.java");
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Order Items"));
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,32 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
+public class SmooksXML2XMLDateManipulation extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Smooks XML->XML date-manipulation Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "transform_XML2XML_date_manipulation";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "transform_XML2XML_date_manipulation_client";
+ }
+
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2xmldatemanipulation.test","SendJMSMessage.java");
+ bot.sleep(Timing.time3S());
+ assertNotNull("Calling Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("OrderDate"));
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,32 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
+public class SmooksXML2XMLSimple extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Smooks XML->XML Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "transform_XML2XML_simple";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "transform_XML2XML_simple_client";
+ }
+
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2xmlsimple.test","SendJMSMessage.java");
+ bot.sleep(Timing.time3S());
+ assertNotNull("Calling Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("<Order"));
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,34 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
+public class WebServiceConsumer1 extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Web Service consumer1 Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "webservice_consumer1";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "webservice_consumer1_client";
+ }
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test","SendJMSMessage.java");
+ assertNotNull("Calling JMS Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Hello World Greeting for 'JMS'"));
+ text = null;
+ text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test","SendEsbMessage.java");
+ assertNotNull("Calling ESB Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling ESB Send message failed, unexpected server output
:"+text,text.contains("Hello World Greeting for 'ESB'"));
+
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2011-01-07
16:38:51 UTC (rev 27987)
@@ -0,0 +1,31 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running),perspective="Java")
+public class WebServiceProducer extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Web Service producer Example";
+ }
+ @Override
+ public String getExampleProjectName() {
+ return "webservice_producer";
+ }
+ @Override
+ public String getExampleClientProjectName() {
+ return "webservice_producer_client";
+ }
+
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+ String text =
executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","jms");
+ assertNotNull("Calling Send message failed, nothing appened to server
log",text);
+ assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Goodbye!!"));
+ fail("testing method http not yet implemented");
+ }
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain