Author: jlukas(a)redhat.com
Date: 2010-07-22 06:04:27 -0400 (Thu, 22 Jul 2010)
New Revision: 23659
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java
Log:
update wstestertest to facelifted (M2) version of the tester
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl 2010-07-22
10:04:27 UTC (rev 23659)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<definitions
xmlns:tns="http://www.ecubicle.net/webservices"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
targetNamespace="http://www.ecubicle.net/webservices">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.ecubicle.net/webservices"
+ schemaLocation="schema.xsd" />
+ </xsd:schema>
+ </types>
+ <message name="GetSearchResults">
+ <part name="parameters" element="tns:GetSearchResults" />
+ </message>
+ <message name="GetSearchResultsResponse">
+ <part name="parameters" element="tns:GetSearchResultsResponse"
/>
+ </message>
+ <portType name="gsearch_rssSoap">
+ <operation name="GetSearchResults">
+ <input message="tns:GetSearchResults" />
+ <output message="tns:GetSearchResultsResponse" />
+ </operation>
+ </portType>
+</definitions>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl 2010-07-22
10:04:27 UTC (rev 23659)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://webservices.www.ecubicle.net/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:jb="http://test.jboss.org/ns"
targetNamespace="http://webservices.www.ecubicle.net/"
+ name="GsearchRssSoap">
+ <import
namespace="http://www.ecubicle.net/webservices"
+ location="imported.wsdl" />
+ <types>
+ <xsd:schema elementFormDefault='qualified'
targetNamespace='http://test.jboss.org/ns'
+ version='1.0'
xmlns:tns='http://test.jboss.org/ns'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <xsd:element name='echo'>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name='person' type='tns:person' />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name='echoResponse' nillable='true'
+ type='tns:echoResponse' />
+ <xsd:complexType name='person'>
+ <xsd:sequence>
+ <xsd:element name='age' type='xsd:int' />
+ <xsd:element name='login' type='xsd:string' />
+ <xsd:element name='male' type='xsd:boolean' />
+ <xsd:element maxOccurs='unbounded' name='nicks'
type='xsd:string' />
+ <xsd:element name='tax' type='xsd:float' />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name='echoResponse'>
+ <xsd:sequence>
+ <xsd:element name='return' type='tns:person' />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </types>
+ <message name="echo">
+ <part name="parameters" element="jb:echo" />
+ </message>
+ <message name="echoResponse">
+ <part name="parameters" element="jb:echoResponse" />
+ </message>
+ <portType name="EchoPortType">
+ <operation name="echo">
+ <input message="tns:echo" />
+ <output message="tns:echoResponse" />
+ </operation>
+ </portType>
+ <binding
xmlns:ns1="http://www.ecubicle.net/webservices"
name="gsearch_rssSoap"
+ type="ns1:gsearch_rssSoap">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="GetSearchResults">
+ <soap:operation
+
soapAction="http://www.ecubicle.net/webservices/GetSearchResults"
+ style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="EchoPortBinding" type="tns:EchoPortType">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="gsearch_rss">
+ <port name="gsearch_rssSoap" binding="tns:gsearch_rssSoap">
+ <soap:address
location="http://www.ecubicle.net/gsearch_rss.asmx" />
+ </port>
+ </service>
+ <service name="EchoService">
+ <port name="EchoPort" binding="tns:EchoPortBinding">
+ <soap:address location="http://localhost:8080/webws/EchoPortType" />
+ </port>
+ </service>
+</definitions>
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd 2010-07-22
10:04:27 UTC (rev 23659)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" version="1.0"
+
targetNamespace="http://www.ecubicle.net/webservices">
+
+ <xs:element name="GetSearchResults">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="searchPage" type="xs:string"
minOccurs="0" />
+ <xs:element name="gQuery" type="xs:string"
minOccurs="0" />
+ <xs:element name="numOfResults" type="xs:string"
+ minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="GetSearchResultsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="GetSearchResultsResult" minOccurs="0">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" namespace="##other"
+ minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java 2010-07-22
09:43:16 UTC (rev 23658)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java 2010-07-22
10:04:27 UTC (rev 23659)
@@ -10,10 +10,15 @@
******************************************************************************/
package org.jboss.tools.ws.ui.bot.test;
+import java.io.BufferedOutputStream;
import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.OutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
@@ -24,6 +29,9 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ws.ui.bot.test.widgets.SelectWSDLDialog;
import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView;
+import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView.Request_Arg_Type;
+import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView.Request_Type;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.junit.Assert;
import org.junit.Test;
@@ -34,264 +42,300 @@
*/
public class WsTesterTest extends SWTTestExt {
- private static final Logger L = Logger.getLogger(WsTesterTest.class.getName());
- private static final String SERVICE_URL =
"http://www.webservicex.net/BibleWebservice.asmx";
+ private static final Logger L = Logger.getLogger(WsTesterTest.class.getName());
+ private static final String SERVICE_URL =
"http://www.webservicex.net/BibleWebservice.asmx";
- /**
- * Test behavior of UI
- */
- @Test
- public void testUI() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView viewBot = wstv.show();
- Assert.assertTrue("Tester View is not active", viewBot.isActive());
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- Assert.assertTrue(wstv.isHttpMethodSelectionEnabled());
- wstv.setHttpMethod(WsTesterView.Http_Method.PUT);
- Assert.assertEquals(WsTesterView.Http_Method.PUT, wstv.getHttpMethod());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
+ /**
+ * Test behavior of UI
+ */
+ @Test
+ public void testUI() {
+ WsTesterView wstv = new WsTesterView();
+ SWTBotView viewBot = wstv.show();
+ Assert.assertTrue("Tester View is not active", viewBot.isActive());
+ wstv.setRequestType(Request_Type.PUT);
+ Assert.assertEquals(Request_Type.PUT, wstv.getRequestType());
+ wstv.setRequestType(Request_Type.JAX_WS);
+ Assert.assertEquals(Request_Type.JAX_WS, wstv.getRequestType());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- Assert.assertTrue(wstv.isHttpMethodSelectionEnabled());
- wstv.setHttpMethod(WsTesterView.Http_Method.DELETE);
- Assert.assertEquals(WsTesterView.Http_Method.DELETE, wstv.getHttpMethod());
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "a",
"1");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "b",
"2");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c",
"3");
- Assert.assertEquals(3,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
-
Assert.assertTrue(wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).containsKey("b"));
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "d",
"4");
- Assert.assertEquals(4,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
-
Assert.assertTrue(wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).containsKey("d"));
- wstv.upRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c",
"3");
- wstv.downRequestArg(WsTesterView.Request_Arg_Type.HEADER, "b",
"2");
- Assert.assertEquals(4,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- wstv.removeRequestArg(WsTesterView.Request_Arg_Type.HEADER, "a",
"1");
- wstv.removeRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c",
"3");
- Assert.assertEquals(2,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.HEADER);
- Assert.assertEquals(0,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
-
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- SelectWSDLDialog dlg = wstv.getFromWSDL();
- dlg.openURL();
- SWTBotShell sh = bot.activeShell();
- sh.bot().text().typeText(SERVICE_URL + "?WSDL");
- sh.bot().button("OK").click();
- bot.sleep(1000);
- Assert.assertEquals(SERVICE_URL + "?WSDL", dlg.getURI());
- List<String> items = dlg.getServices();
- L.log(Level.FINE, "Services: {0}", items);
- Assert.assertEquals(1, items.size());
- Assert.assertTrue(items.contains("BibleWebservice"));
- items = dlg.getPorts();
- L.log(Level.FINE, "Ports: {0}", items);
- Assert.assertEquals(2, items.size());
- Assert.assertTrue(items.contains("BibleWebserviceSoap"));
- Assert.assertTrue(items.contains("BibleWebserviceSoap12"));
- items = dlg.getOperations();
- L.log(Level.FINE, "Operations: {0}", items);
- Assert.assertEquals(4, items.size());
- Assert.assertTrue(items.contains("GetBookTitles"));
- Assert.assertTrue(items.contains("GetBibleWordsByChapterAndVerse"));
- dlg.selectOperation("GetBibleWordsbyKeyWord");
- dlg.ok();
-
Assert.assertEquals("http://www.webservicex.net/BibleWebservice.asmx...;,
wstv.getServiceURL());
-
Assert.assertEquals("http://www.webserviceX.NET/GetBibleWordsbyKeyWo...;,
wstv.getActionURL());
- viewBot.close();
- }
+ wstv.setRequestType(Request_Type.DELETE);
+ Assert.assertEquals(Request_Type.DELETE, wstv.getRequestType());
+ wstv.expandSection(Request_Arg_Type.HEADER.toString());
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "a", "1");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "b", "2");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "c", "3");
+ Assert.assertEquals(3, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ Assert.assertTrue(wstv.getRequestArgs(Request_Arg_Type.HEADER).containsKey("b"));
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "d", "4");
+ Assert.assertEquals(4, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ Assert.assertTrue(wstv.getRequestArgs(Request_Arg_Type.HEADER).containsKey("d"));
+ Assert.assertEquals(4, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ wstv.removeRequestArg(Request_Arg_Type.HEADER, "a", "1");
+ wstv.removeRequestArg(Request_Arg_Type.HEADER, "c", "3");
+ Assert.assertEquals(2, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ wstv.clearRequestArgs(Request_Arg_Type.HEADER);
+ Assert.assertEquals(0, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
- /**
- * Test SOAP service invocation
- */
- @Test
- public void testSOAPService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
- String actionUrl =
"http://www.webserviceX.NET/GetBibleWordsByChapterAndVerse";
- wstv.setServiceURL(SERVICE_URL);
- wstv.setActionURL(actionUrl);
- InputStream is =
WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
- wstv.setRequestBody(readResource(is));
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- L.log(Level.FINE, "SOAP response: {0}", rsp);
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp,
"<BookTitle>Mark</BookTitle>");
- }
+ wstv.setRequestType(Request_Type.JAX_WS);
+ SelectWSDLDialog dlg = wstv.getFromWSDL();
+ try {
+ dlg.openURL();
+ SWTBotShell sh = bot.activeShell();
+ sh.bot().text().typeText(SERVICE_URL + "?WSDL");
+ sh.bot().button("OK").click();
+ bot.sleep(1000);
+ Assert.assertEquals(SERVICE_URL + "?WSDL", dlg.getURI());
+ List<String> items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("BibleWebservice"));
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("BibleWebserviceSoap"));
+ Assert.assertTrue(items.contains("BibleWebserviceSoap12"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(4, items.size());
+ Assert.assertTrue(items.contains("GetBookTitles"));
+ Assert.assertTrue(items.contains("GetBibleWordsByChapterAndVerse"));
+ dlg.selectOperation("GetBibleWordsbyKeyWord");
+ dlg.ok();
+
Assert.assertEquals("http://www.webservicex.net/BibleWebservice.asmx...;,
wstv.getServiceURL());
+ } finally {
+ if (dlg.isOpen()) {
+ dlg.close();
+ }
+ }
+ viewBot.close();
+ }
- /**
- * Test REST service invocation (GET request)
- */
- @Test
- public void testRESTGETService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.GET);
- wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER);
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER,
"BookTitle", "Luke");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "chapter",
"2");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "Verse",
"2");
- wstv.editRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "chapter",
"2", "chapter", "1");
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp,
"<Chapter>1</Chapter>");
- checkResponse(rsp, "ministers of the word");
- }
+ /**
+ * Test refreshing body requests in the UI
+ */
+ @Test
+ public void testNamespaces() {
+ String uri = new File(prepareWsdl(), "original.wsdl").toURI().toString();
+ WsTesterView wstv = new WsTesterView();
+ SWTBotView viewBot = wstv.show();
+ Assert.assertTrue("Tester View is not active", viewBot.isActive());
+ SelectWSDLDialog dlg = wstv.getFromWSDL();
+ dlg.setURI(uri);
+ bot.sleep(1000);
+ List<String> items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("EchoService"));
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("EchoPort"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("echo"));
+ dlg.ok();
+ L.log(Level.INFO, "Request: {0}", wstv.getRequestBody());
+ Assert.assertTrue(wstv.getRequestBody().contains(
+ "<echo xmlns = \"http://test.jboss.org/ns\">"));
- /**
- * Test REST service invocation (POST request)
- */
- @Test
- public void testRESTPOSTService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.POST);
- wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
- String requestBody = "BookTitle=John&chapter=3&Verse=1\r";
- wstv.setRequestBody(requestBody);
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER);
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER,
"Content-Type", "application/x-www-form-urlencoded");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER,
"Content-Length", String.valueOf(requestBody.length()));
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp,
"<Chapter>3</Chapter>");
- checkResponse(rsp, "There was a man of the Pharisees, named Nicodemus, a
ruler of the Jews");
- }
+ dlg = wstv.getFromWSDL();
+ dlg.setURI(uri);
+ bot.sleep(1000);
+ items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("gsearch_rss"));
+ dlg.selectService("gsearch_rss");
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("gsearch_rssSoap"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("GetSearchResults"));
+ dlg.ok();
+ L.log(Level.INFO, "Request: {0}", wstv.getRequestBody());
+ Assert.assertTrue(wstv.getRequestBody().contains(
+ "<GetSearchResults xmlns =
\"http://www.ecubicle.net/webservices\">"));
+ }
-// @Test
-// @Ignore
-// public void testSOAPSample() {
-// WsTesterView wstv = new WsTesterView();
-// wstv.show();
-// wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
-// wstv.setSampleContent();
-// wstv.invoke();
-// String rsp = wstv.getResponseBody();
-// L.log(Level.FINE, "SOAP Sample response: {0}", rsp);
-// checkResponse(rsp, "To be, or not to be: that is the question");
-// }
-//
-// @Test
-// @Ignore
-// public void testRESTSample() {
-// WsTesterView wstv = new WsTesterView();
-// SWTBotView viewBot = wstv.show();
-// wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
-// wstv.setSampleContent();
-// wstv.invoke();
-// String rsp = wstv.getResponseBody();
-// String[] rspHeaders = wstv.getResponseHeaders();
-// L.log(Level.FINE, "REST Sample response: {0}", rsp);
-// L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
-// checkResponse(rsp, "Colorado Springs");
-// viewBot.close();
-// }
+ /**
+ * Test SOAP service invocation
+ */
+ @Test
+ public void testSOAPService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.JAX_WS);
+ Assert.assertEquals(Request_Type.JAX_WS, wstv.getRequestType());
+ wstv.setServiceURL(SERVICE_URL);
+ InputStream is =
WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
+ wstv.setRequestBody(readResource(is));
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ L.log(Level.FINE, "SOAP response: {0}", rsp);
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp,
"<BookTitle>Mark</BookTitle>");
+ }
- @Test
- public void testOpenMonitor() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView tv = wstv.show();
- wstv.openMonitor();
- SWTBotView av = bot.activeView();
- Assert.assertEquals("TCP/IP Monitor", av.getTitle());
- av.close();
- tv.close();
- }
+ /**
+ * Test REST service invocation (GET request)
+ */
+ @Test
+ public void testRESTGETService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.GET);
+ wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
+ wstv.expandSection(Request_Arg_Type.PARAMETER.toString());
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "BookTitle",
"Luke");
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "chapter", "2");
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "Verse", "2");
+ wstv.editRequestArg(Request_Arg_Type.PARAMETER, "chapter", "2",
"chapter", "1");
+ try {
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "<Chapter>1</Chapter>");
+ checkResponse(rsp, "ministers of the word");
+ } finally {
+ wstv.clearRequestArgs(Request_Arg_Type.PARAMETER);
+ }
+ }
- @Test
- public void testConfigureMonitor() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView tv = wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
- String actionUrl =
"http://www.webserviceX.NET/GetBibleWordsByChapterAndVerse";
- wstv.setServiceURL(SERVICE_URL);
- wstv.setActionURL(actionUrl);
- InputStream is =
WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
- wstv.setRequestBody(readResource(is));
- wstv.configureMonitor();
- SWTBotShell sh = bot.activeShell();
- Assert.assertEquals("New Monitor", sh.getText());
- sh.bot().spinner("80", 0).setSelection(8077);
- sh.bot().button("OK").click();
- tv.show();
- wstv.invoke();
- tv.show();
- String rsp = wstv.getResponseBody();
- L.log(Level.FINE, "SOAP response: {0}", rsp);
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp,
"<BookTitle>Mark</BookTitle>");
- }
+ /**
+ * Test REST service invocation (POST request)
+ */
+ @Test
+ public void testRESTPOSTService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(WsTesterView.Request_Type.POST);
+ wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
+ String requestBody = "BookTitle=John&chapter=3&Verse=1\r";
+ wstv.setRequestBody(requestBody);
+ wstv.expandSection(Request_Arg_Type.HEADER.toString());
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "Content-Type",
"application/x-www-form-urlencoded");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "Content-Length",
String.valueOf(requestBody.length()));
+ try {
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "<Chapter>3</Chapter>");
+ checkResponse(rsp, "There was a man of the Pharisees, named Nicodemus, a ruler of
the Jews");
+ } finally {
+ wstv.clearRequestArgs(Request_Arg_Type.HEADER);
+ }
+ }
- @Test
- public void testErrorResponse() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.GET);
-
wstv.setServiceURL("http://www.zvents.com/rest/event_update");
- wstv.invoke();
- Assert.assertEquals(0,
wstv.getRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER).size());
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "Invalid API Key.");
- }
+ @Test
+ public void testErrorResponse() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.GET);
+
wstv.setServiceURL("http://www.zvents.com/rest/event_update");
+ wstv.invoke();
+ Assert.assertEquals(0, wstv.getRequestArgs(Request_Arg_Type.PARAMETER).size());
+ String rsp = wstv.getResponseBody();
+ wstv.expandSection(JBossWSUIMessages.JAXRSWSTestView2_ResponseHeaders_Section);
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "Invalid API Key.");
+ }
- private String readResource(InputStream is) {
- StringBuilder sb = new StringBuilder();
- BufferedReader br = null;
- try {
- br = new BufferedReader(new InputStreamReader(is));
- String s;
- while ((s = br.readLine()) != null) {
- sb.append(s);
- sb.append('\n');
- }
- } catch (IOException e) {
- L.log(Level.WARNING, e.getMessage(), e);
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- L.log(Level.FINEST, e.getMessage(), e);
- }
- }
- }
- return sb.toString();
- }
+ private String readResource(InputStream is) {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new InputStreamReader(is));
+ String s;
+ while ((s = br.readLine()) != null) {
+ sb.append(s);
+ sb.append('\n');
+ }
+ } catch (IOException e) {
+ L.log(Level.WARNING, e.getMessage(), e);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ L.log(Level.FINEST, e.getMessage(), e);
+ }
+ }
+ }
+ return sb.toString();
+ }
- private void checkResponse(String rsp, String expContent) {
- try {
- Assert.assertTrue(rsp, rsp.contains(expContent));
- } catch (AssertionError t) {
- if (rsp.contains("503")) {
- L.log(Level.WARNING, "Service Unavailable: {0}", SERVICE_URL);
- } else {
- throw t;
- }
- }
- }
+ private void checkResponse(String rsp, String expContent) {
+ try {
+ Assert.assertTrue(rsp, rsp.contains(expContent));
+ } catch (AssertionError t) {
+ if (rsp.contains("503")) {
+ L.log(Level.WARNING, "Service Unavailable: {0}", SERVICE_URL);
+ } else {
+ throw t;
+ }
+ }
+ }
+
+ private File prepareWsdl() {
+ String[] files = { "imported.wsdl", "original.wsdl",
"schema.xsd" };
+ File targetFolder = new File(System.getProperty("java.io.tmpdir"),
+ "WsTesterTest");
+ targetFolder.mkdirs();
+ for (String file : files) {
+ InputStream is = WsTesterTest.class.getResourceAsStream("/wsdl/"
+ + file);
+ File target = new File(targetFolder, file);
+ if (target.exists()) {
+ target.delete();
+ }
+ try {
+ OutputStream os = new BufferedOutputStream(
+ new FileOutputStream(target));
+ copy(is, os);
+ } catch (FileNotFoundException fnfe) {
+ throw new RuntimeException(fnfe);
+ }
+ }
+ return targetFolder;
+ }
+
+ private void copy(InputStream in, OutputStream out) {
+ byte[] buf = new byte[1024];
+ int len;
+ try {
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ } finally {
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException ioe2) {
+ L.log(Level.WARNING, ioe2.getMessage(), ioe2);
+ }
+ }
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException ioe2) {
+ L.log(Level.WARNING, ioe2.getMessage(), ioe2);
+ }
+ }
+ }
+ }
}
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java 2010-07-22
09:43:16 UTC (rev 23658)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java 2010-07-22
10:04:27 UTC (rev 23659)
@@ -24,26 +24,37 @@
public SelectWSDLDialog(Shell shell) throws WidgetNotFoundException {
super(shell);
+ //Select WSDL
assert JBossWSUIMessages.WSDLBrowseDialog_Dialog_Title.equals(getText());
}
public void openURL() {
+ //URL...
bot().button(JBossWSUIMessages.WSDLBrowseDialog_URL_Browse).click();
}
- // public void setURI(String s) {
- //
bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).setText(s);
- // }
+ public void setURI(String s) {
+ //WSDL URI:
+ bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).setText(s);
+ }
public String getURI() {
+ //WSDL URI:
return
bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).getText();
}
public List<String> getServices() {
+ //Service:
return getItems(JBossWSUIMessages.WSDLBrowseDialog_Service_Field);
}
+
+ public void selectService(String service) {
+ //Service:
+ bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_Service_Field).setSelection(service);
+ }
public List<String> getPorts() {
+ //Port:
return getItems(JBossWSUIMessages.WSDLBrowseDialog_Port_Field);
}
@@ -65,6 +76,7 @@
}
private SWTBotList getOperationsList() {
+ //Operation:
return bot().listWithLabel(JBossWSUIMessages.WSDLBrowseDialog_Operation_Field);
}
}
\ No newline at end of file
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java 2010-07-22
09:43:16 UTC (rev 23658)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java 2010-07-22
10:04:27 UTC (rev 23659)
@@ -17,18 +17,19 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.jboss.tools.ui.bot.ext.gen.IView;
import org.jboss.tools.ui.bot.ext.view.ViewBase;
-import org.jboss.tools.ws.ui.bot.test.WsTesterTest;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.osgi.framework.Bundle;
@@ -37,30 +38,29 @@
private static final Bundle WSUI_BUNDLE =
Platform.getBundle("org.jboss.tools.ws.ui");
- public enum Ws_Type {
+ public enum Request_Type {
- JAX_WS, JAX_RS;
+ JAX_WS, GET, POST, PUT, DELETE;
- String getLabel() {
+ @Override
+ public String toString() {
switch (this) {
case JAX_WS:
return "JAX-WS";
- case JAX_RS:
- return "JAX-RS";
+ default:
+ return super.toString();
}
- throw new AssertionError("Invalid Web Service Type");
}
- }
- public enum Http_Method {
-
- GET, POST, PUT, DELETE;
+ public static Request_Type parse(String s) {
+ return "JAX-WS".equals(s) ? JAX_WS : valueOf(s);
+ }
}
public enum Request_Arg_Type {
- HEADER(JBossWSUIMessages.JAXRSWSTestView_Request_Header_Label),
- PARAMETER(JBossWSUIMessages.JAXRSWSTestView_Request_Parameters_Label);
+ HEADER(JBossWSUIMessages.JAXRSWSTestView2_Headers_Section),
+ PARAMETER(JBossWSUIMessages.JAXRSWSTestView2_Parameters_Section);
private String type;
@@ -71,6 +71,11 @@
private String getType() {
return type;
}
+
+ @Override
+ public String toString() {
+ return getType();
+ }
}
public WsTesterView() {
@@ -98,63 +103,63 @@
return b;
}
- public void setWebServiceType(WsTesterView.Ws_Type type) {
- // Web Service Type:
- comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_Web_Service_Type_Label)
- .setSelection(type.getLabel());
+ public void setRequestType(Request_Type m) {
+ getRequestTypeCombo().setSelection(m.toString());
}
- // public void setSampleContent() {
- // button(JBossWSUIMessages.JAXRSWSTestView_Set_Sample_Data_Label).click();
- // }
-
- public void setHttpMethod(WsTesterView.Http_Method m) {
- getHTTPTypeCombo().setSelection(m.toString());
+ public Request_Type getRequestType() {
+ return Request_Type.parse(getRequestTypeCombo().getText());
}
- public WsTesterView.Http_Method getHttpMethod() {
- return Enum.valueOf(WsTesterView.Http_Method.class, getHTTPTypeCombo().getText());
- }
-
- public boolean isHttpMethodSelectionEnabled() {
- return getHTTPTypeCombo().isEnabled();
- }
-
public void setServiceURL(String url) {
- getServiceURLCombo().typeText(url);
+ SWTBotCombo c = getServiceURLCombo();
+ c.setText("");
+ c.typeText(url);
}
public String getServiceURL() {
return getServiceURLCombo().getText();
}
- public void setActionURL(String s) {
- getActionURLText().typeText(s);
+ public void setRequestBody(String s) {
+ // Body Text
+ textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section).setText(s);
}
- public String getActionURL() {
- return getActionURLText().getText();
+ public String getRequestBody() {
+ // Body Text
+ return textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section).getText();
}
- public void setRequestBody(String s) {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Request_Body_Label);
- ti.activate();
- text(1).setText(s);
+ public void expandSection(String name) {
+ class X extends SWTBotLabel {
+ X(Label y){
+ super(y);
+ }
+
+ void expand() {
+ boolean expanded = syncExec(new BoolResult() {
+
+ public Boolean run() {
+ return ((ExpandableComposite) widget.getParent()).isExpanded();
+ }
+ });
+ assert !expanded : "Section '" + widget.getText() + "' is
already expanded";
+ click(true);
+ }
+ }
+ new X(label(name).widget).expand();
}
public void addRequestArg(WsTesterView.Request_Arg_Type type, String name,
String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- text(1).typeText(name + "=" + value);
- WsTesterTest.bot.button("Add").click();
- text(1).setText("");
+ text(type.ordinal()).typeText(name + "=" + value);
+ button("Add", type.ordinal()).click();
+ text(type.ordinal()).setText("");
}
public Map<String, String> getRequestArgs(WsTesterView.Request_Arg_Type type) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- String[] args = list(0).getItems();
+ String[] args = list(type.ordinal()).getItems();
Map<String, String> result = new HashMap<String, String>();
for (String s : args) {
int i = s.indexOf('=');
@@ -165,96 +170,55 @@
public void editRequestArg(WsTesterView.Request_Arg_Type type,
String oldName, String oldValue, String newName, String newValue) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- WsTesterTest.bot.list(0).select(oldName + "=" + oldValue);
- WsTesterTest.bot.button("Edit").click();
- SWTBot sh = WsTesterTest.bot.activeShell().bot();
+ list(type.ordinal()).select(oldName + "=" + oldValue);
+ button("Edit", type.ordinal()).click();
+ SWTBot sh = activeShell().bot();
sh.text(0).typeText(newName + "=" + newValue);
sh.button(IDialogConstants.OK_LABEL).click();
}
- public void upRequestArg(WsTesterView.Request_Arg_Type type, String name,
- String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Up").click();
- }
-
- public void downRequestArg(WsTesterView.Request_Arg_Type type, String name,
- String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Down").click();
- }
-
public void removeRequestArg(WsTesterView.Request_Arg_Type type,
String name, String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Remove").click();
+ list(type.ordinal()).select(name + "=" + value);
+ button("Remove", type.ordinal()).click();
}
public void clearRequestArgs(WsTesterView.Request_Arg_Type type) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- SWTBotButton b = WsTesterTest.bot.button("Clear All");
- if (b.isEnabled()) {
- b.click();
- }
+ SWTBotButton b = button("Clear All", type.ordinal());
+ b.click();
}
public String getResponseBody() {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Results_Body_Label);
- ti.activate();
- return WsTesterTest.bot.text(2).getText();
+ return
textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_ResponseBody_Section).getText();
}
public String[] getResponseHeaders() {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Results_Header_Label);
- ti.activate();
- return list(1).getItems();
+ return
listWithLabel(JBossWSUIMessages.JAXRSWSTestView2_ResponseHeaders_Section).getItems();
}
public void invoke() {
- String dlgTitle = JBossWSUIMessages.JAXRSWSTestView_Invoke_Label;
- button(dlgTitle).click();
- waitWhile(Conditions.shellIsActive(dlgTitle), 120000);
+ toolbarButtonWithTooltip(JBossWSUIMessages.JAXRSWSTestView2_Go_Tooltip).click();
+ waitWhile(Conditions.shellIsActive(JBossWSUIMessages.JAXRSWSTestView_Invoke_Label),
120000);
sleep(500);
}
public SelectWSDLDialog getFromWSDL() {
- button(JBossWSUIMessages.JAXRSWSTestView_Button_Get_From_WSDL).click();
+ toolbarButtonWithTooltip(JBossWSUIMessages.JAXRSWSTestView2_GetFromWSDL_Tooltip).click();
return new SelectWSDLDialog(activeShell().widget);
}
- public void openMonitor() {
- button(JBossWSUIMessages.JAXRSWSTestView_Open_Monitor_Button).click();
- }
-
- public void configureMonitor() {
- button(JBossWSUIMessages.JAXRSWSTestView_Configure_Monitor_Button).click();
- }
-
private String getStringFromBundle(String key) {
return Platform.getResourceString(WSUI_BUNDLE, key);
}
- private SWTBotCombo getHTTPTypeCombo() {
+ private SWTBotCombo getRequestTypeCombo() {
// HTTP Method:
- return comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_HTTP_Method_Label);
+ return comboBox(1);
}
private SWTBotCombo getServiceURLCombo() {
// Service URL:
- return comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_Service_URL_Label);
+ return comboBox(0);
}
- private SWTBotText getActionURLText() {
- // Action URL:
- return textWithLabel(JBossWSUIMessages.JAXRSWSTestView_Action_URL_Label);
- }
}
\ No newline at end of file