You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/03/01 20:13:19 UTC
svn commit: r155816 - in incubator/apollo/trunk/src:
java/org/apache/ws/resource/i18n/Keys.java
site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java
Author: scamp
Date: Tue Mar 1 11:13:19 2005
New Revision: 155816
URL: http://svn.apache.org/viewcvs?view=rev&rev=155816
Log: (empty)
Modified:
incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java
incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java?view=diff&r1=155815&r2=155816
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java Tue Mar 1 11:13:19 2005
@@ -167,7 +167,7 @@
String ERROR_INVOKING_METHOD_ON_SERVICE = "ERROR_INVOKING_METHOD_ON_SERVICE";
/**
- * @msg Unexpected error. Casue: {0}
+ * @msg Unexpected error. Cause: {0}
*/
String UNEXPECTED_ERROR_WITH_EXCEPTION = "UNEXPECTED_ERROR_WITH_EXCEPTION";
Modified: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java?view=diff&r1=155815&r2=155816
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java (original)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java Tue Mar 1 11:13:19 2005
@@ -9,7 +9,6 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
-import java.net.MalformedURLException;
/**
* Created by IntelliJ IDEA.
@@ -18,23 +17,23 @@
* Time: 10:20:29 AM
* To change this template use File | Settings | File Templates.
*/
-public class InteropTestCase extends AbstractOneAxisTestCase{
+public class InteropTestCase extends AbstractOneAxisTestCase {
//this makes the test case not start the axis server...
- private static boolean m_runAxisServer = false;
+ private static boolean m_runAxisServer = true;
private static String PRINTER_FACTORY_PORT = "PrinterFactory";
private static final String PRINTER_PORT = "PrinterPort";
private static final String JOB_PORT = "JobPort";
//setup urls
private String m_baseURL = "http://localhost:8080/wsrf/services/";
- private String m_printerFactoryURL= m_baseURL + PRINTER_FACTORY_PORT;
- private String m_printerURL= m_baseURL + PRINTER_PORT;
- private String m_jobURL= m_baseURL + JOB_PORT;
+ private String m_printerFactoryURL = m_baseURL + PRINTER_FACTORY_PORT;
+ private String m_printerURL = m_baseURL + PRINTER_PORT;
+ private String m_jobURL = m_baseURL + JOB_PORT;
//setup base path
private File m_basePath = new File(".");
//setup requests path
- private File m_requestsDir = new File(m_basePath,"requests");
+ private File m_requestsDir = new File(m_basePath, "requests");
private static final String SOAP_REQ_CREATE_PRINTER = "CreatePrinter.soap";
@@ -46,18 +45,19 @@
protected void setUp() throws Exception {
super.setUp();
//set the base url to the Axis one if running server embedded in unit test
- if(m_runAxisServer)
- {
+ if (m_runAxisServer) {
m_baseURL = getAxisBaseUrl().toString();
//reinit urls for axis path
- m_printerFactoryURL= m_baseURL + PRINTER_FACTORY_PORT;
- m_printerURL= m_baseURL + PRINTER_PORT;
- m_jobURL= m_baseURL + JOB_PORT;
+ m_printerFactoryURL = m_baseURL + PRINTER_FACTORY_PORT;
+ m_printerURL = m_baseURL + PRINTER_PORT;
+ m_jobURL = m_baseURL + JOB_PORT;
//init jndi from config
XmlBeanJndiUtils.initializeFromInputStream(Thread.currentThread().getContextClassLoader().getResourceAsStream(XmlBeanJndiUtils.JNDI_CONFIG_FILENAME));
}
+ //init the printer so its ready///todo not sure if should do it here...
+ createPrinter();
}
protected FileProvider getFileProvider() throws ConfigurationException {
@@ -65,111 +65,107 @@
}
//***** tests ********
- public void testCreatePrinter() throws IOException
- {
+ public void createPrinter() throws IOException {
String response = sendRequest(m_printerFactoryURL, SOAP_REQ_CREATE_PRINTER);
assertTrue(response.indexOf("CreatePrinterResponse") > -1);
}
public void testValidatePrinterInitialState() throws IOException {
String response = sendRequest(m_printerURL, "GetPrinterPropertiesDoc.soap");
+ assertTrue(response.indexOf("printer_properties") > -1);
assertTrue(response.indexOf("job_count>0") > -1);
assertTrue(response.indexOf("accepting_jobs>false") > -1);
}
- public void testGetPrinterQueueCount_SCENARIO_A1 ()
- {
-
+ public void testGetPrinterQueueCount_SCENARIO_A1() throws IOException {
+ String response = sendRequest(m_printerURL, "GetQueuedJobCount.soap");
+ assertTrue(response.indexOf("GetResourcePropertyResponse") > -1);
+ assertTrue(response.indexOf("draft-03.xsd\">0") > -1);
}
- public void testGetPrinterStateAndQueueCount_SCENARIO_A2 ()
- {
-
+ public void testGetPrinterStateAndQueueCount_SCENARIO_A2() throws IOException {
+ String response = sendRequest(m_printerURL, "GetMulti.soap");
+ assertTrue(response.indexOf("GetMultipleResourcePropertiesResponse") > -1);
+ assertTrue(response.indexOf("Idle") > -1);
+ assertTrue(response.indexOf("raft-03.xsd\">0") > -1);
}
- public void testGetPrinterResourcePropertiesDocument_SCENARIO_A3 ()
- {
-
+ public void testGetPrinterResourcePropertiesDocument_SCENARIO_A3() throws IOException {
+ String response = sendRequest(m_printerURL, "GetPrinterPropertiesDoc.soap");
+ assertTrue(response.indexOf("GetResourcePropertyDocumentResponse")> -1);
+ assertTrue(response.indexOf("printer_properties") > -1);
+ assertTrue(response.indexOf("operations_supported") > -1);
}
- public void testQueryResourceProperties_SCENARIO_A4 ()
- {
-
+ public void testQueryResourceProperties_SCENARIO_A4() throws IOException {
+ String response = sendRequest(m_printerURL, "QueryPropertiesDoc.soap");
+ assertTrue(response.indexOf("QueryResourcePropertiesResponse") > -1);
+ assertTrue(response.indexOf("true") > -1);
}
- public void testQueryCompletedJobs_SCENARIO_VARIANT()
- {
+ public void testQueryCompletedJobs_SCENARIO_A4_VARIANT() throws IOException {
//job_properties[contains(job_state,"completed")]/*
- //todo ensure job state is set to completed
+ //todo ensure job state is set to completed QueryJobsCompleted.soap
+ String response = sendRequest(m_printerURL, "QueryJobsCompleted.soap");
+ assertTrue(response.indexOf("QueryResourcePropertiesResponse") > -1);
+ //assertTrue(response.indexOf("true") > -1);
}
- public void testUpdateResourceProperties_SCENARIO_B1()
- {
+ public void testUpdateResourceProperties_SCENARIO_B1() {
}
- public void testFailInsertResourceProps_SCENARIO_B1_FAIL()
- {
+ public void testFailInsertResourceProps_SCENARIO_B1_FAIL() {
}
- public void testSetResourceProperties_SCENARIO_B2()
- {
- //validate printer props are updated
+ public void testSetResourceProperties_SCENARIO_B2() {
+ //validate printer props are updated
}
- public void testMultiSetResourceProps_SCENARIO_B3()
- {
- //there are 2 calls in the spec
+ public void testMultiSetResourceProps_SCENARIO_B3() {
+ //there are 2 calls in the spec
}
- public void testFailMultiSetResourceProps_SCENARIO_B3_VARIANT()
- {
+ public void testFailMultiSetResourceProps_SCENARIO_B3_VARIANT() {
}
- public void testResetToInitialState_SCENARIO_B3_RESET()
- {
+ public void testResetToInitialState_SCENARIO_B3_RESET() {
}
- public void testPrintJob_SCENARIO_C()
- {
+ public void testPrintJob_SCENARIO_C() {
}
- public void testValidatePrinterJobProperties()
- {
+ public void testValidatePrinterJobProperties() {
//job_state pending until printing starts
//todo look at job states
}
- public void testDestroy_SCENARIO_D()
- {
+ public void testDestroy_SCENARIO_D() {
//note a second destroy should fail
}
- public void testFailDestroy_SCENARIO_D_FAIL()
- {
+ public void testFailDestroy_SCENARIO_D_FAIL() {
- //note a second destroy should fail
+ //note a second destroy should fail
- }
+ }
- public void testScheduledTermination_SCENARIO_E()
- {
+ public void testScheduledTermination_SCENARIO_E() {
//validateprinterjobprops
}
- public void testSetTerminationTime_SCENARIO_E_CONTINUED()
- {
+ public void testSetTerminationTime_SCENARIO_E_CONTINUED() {
}
- public void testSendDocument_SCENARIO_E_CONTINUED()
- {
+
+ public void testSendDocument_SCENARIO_E_CONTINUED() {
}
@@ -178,6 +174,7 @@
public void setRunAxisServer(boolean RUN_AXIS_SERVER) {
this.RUN_AXIS_SERVER = RUN_AXIS_SERVER;
}
+
public void setBaseURL(String m_baseURL) {
this.m_baseURL = m_baseURL;
}
@@ -199,6 +196,6 @@
}
public String sendRequest(String requestURL, String requestFileName) throws IOException {
- return SoapClient.sendRequest(new URL(requestURL), new File(m_requestsDir,requestFileName),null);
+ return SoapClient.sendRequest(new URL(requestURL), new File(m_requestsDir, requestFileName), null);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org