You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2002/07/21 14:09:17 UTC
cvs commit: jakarta-cactus/framework/src/test/share/org/apache/cactus/client TestWebTestResultParser.java
vmassol 2002/07/21 05:09:17
Modified: framework build.xml
framework/src/java/j2ee13/org/apache/cactus/client
FilterHttpClient.java
framework/src/java/j2ee13/org/apache/cactus/server
HttpServletRequestWrapper.java
ServletContextWrapper.java
framework/src/java/share/org/apache/cactus
AbstractTestCase.java AbstractWebTestCase.java
Cookie.java WebRequest.java WebResponse.java
WebTestResult.java
framework/src/java/share/org/apache/cactus/client
AbstractHttpClient.java
AutoReadHttpURLConnection.java
HttpClientHelper.java JspHttpClient.java
ServletHttpClient.java WebTestResultParser.java
framework/src/java/share/org/apache/cactus/client/authentication
BasicAuthentication.java
framework/src/java/share/org/apache/cactus/server
AbstractHttpServletRequestWrapper.java
AbstractWebTestCaller.java ServletUtil.java
framework/src/java/share/org/apache/cactus/server/runner
ServletTestRunner.java XMLFormatter.java
framework/src/java/share/org/apache/cactus/util
AssertUtils.java Configuration.java
framework/src/java/share/org/apache/cactus/util/log
LogService.java
framework/src/test/share/org/apache/cactus
TestAbstractTestCaseInterceptorTestCase.java
TestWebTestResult.java
framework/src/test/share/org/apache/cactus/client
TestWebTestResultParser.java
Log:
checkstyle improvements
Revision Changes Path
1.17 +0 -1 jakarta-cactus/framework/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/build.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.xml 20 Jul 2002 11:03:34 -0000 1.16
+++ build.xml 21 Jul 2002 12:09:15 -0000 1.17
@@ -548,7 +548,6 @@
publicMemberPattern="^[a-z][a-zA-Z0-9]*$"
headerFile="./LICENSE.cactus"
failOnViolation="true"
- wrapOp="ignore"
maxParameters="10"
cacheFile="${target.dir}/checkstyle.cache">
1.5 +3 -3 jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/client/FilterHttpClient.java
Index: FilterHttpClient.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/client/FilterHttpClient.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FilterHttpClient.java 5 May 2002 14:28:50 -0000 1.4
+++ FilterHttpClient.java 21 Jul 2002 12:09:15 -0000 1.5
@@ -82,8 +82,8 @@
// Check if user has overriden the servlet redirector
if (theRequest.getRedirectorName() != null) {
- url = FilterConfiguration.getContextURL() + "/" +
- theRequest.getRedirectorName();
+ url = FilterConfiguration.getContextURL() + "/"
+ + theRequest.getRedirectorName();
} else {
url = FilterConfiguration.getFilterRedirectorURL();
}
1.4 +4 -4 jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/HttpServletRequestWrapper.java
Index: HttpServletRequestWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/HttpServletRequestWrapper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HttpServletRequestWrapper.java 14 Apr 2002 10:35:44 -0000 1.3
+++ HttpServletRequestWrapper.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -106,9 +106,9 @@
if (this.url != null) {
- result = new StringBuffer(this.url.getProtocol() + "://" +
- getServerName() + ":" + getServerPort() + getContextPath() +
- getServletPath() + getPathInfo());
+ result = new StringBuffer(this.url.getProtocol() + "://"
+ + getServerName() + ":" + getServerPort() + getContextPath()
+ + getServletPath() + getPathInfo());
} else {
result = this.request.getRequestURL();
1.3 +11 -11 jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/ServletContextWrapper.java
Index: ServletContextWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/ServletContextWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServletContextWrapper.java 14 Apr 2002 10:35:44 -0000 1.2
+++ ServletContextWrapper.java 21 Jul 2002 12:09:16 -0000 1.3
@@ -104,14 +104,14 @@
if (method != null) {
returnSet = (Set) method.invoke(this.originalContext, null);
} else {
- throw new RuntimeException("Method ServletContext." +
- "getResourcePaths() no longer supported by your servlet " +
- "engine !");
+ throw new RuntimeException("Method ServletContext."
+ + "getResourcePaths() no longer supported by your servlet "
+ + "engine !");
}
} catch (Exception e) {
e.printStackTrace();
- throw new RuntimeException("Error getting/calling method " +
- "getResourcePaths()");
+ throw new RuntimeException("Error getting/calling method "
+ + "getResourcePaths()");
}
return returnSet;
@@ -139,14 +139,14 @@
returnSet = (Set) method.invoke(this.originalContext,
new Object[]{thePath});
} else {
- throw new RuntimeException("Method ServletContext." +
- "getResourcePaths(String path) not supported yet by your " +
- "servlet engine !");
+ throw new RuntimeException("Method ServletContext."
+ + "getResourcePaths(String path) not supported yet by your "
+ + "servlet engine !");
}
} catch (Exception e) {
e.printStackTrace();
- throw new RuntimeException("Error getting/calling method " +
- "getResourcePaths(String path)");
+ throw new RuntimeException("Error getting/calling method "
+ + "getResourcePaths(String path)");
}
return returnSet;
1.8 +24 -23 jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractTestCase.java
Index: AbstractTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractTestCase.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractTestCase.java 12 May 2002 19:42:28 -0000 1.7
+++ AbstractTestCase.java 21 Jul 2002 12:09:16 -0000 1.8
@@ -141,9 +141,9 @@
{
// Sanity check
if (!this.getCurrentTestMethod().startsWith(TEST_METHOD_PREFIX)) {
- throw new RuntimeException("bad name [" +
- this.getCurrentTestMethod() + "]. It should start with [" +
- TEST_METHOD_PREFIX + "].");
+ throw new RuntimeException("bad name ["
+ + this.getCurrentTestMethod() + "]. It should start with ["
+ + TEST_METHOD_PREFIX + "].");
}
return this.getCurrentTestMethod().substring(
@@ -256,34 +256,35 @@
// Check return type
if (!methods[i].getReturnType().getName().equals("void")) {
- fail("The begin method [" + methods[i].getName() +
- "] should return void and not [" +
- methods[i].getReturnType().getName() + "]");
+ fail("The begin method [" + methods[i].getName()
+ + "] should return void and not ["
+ + methods[i].getReturnType().getName() + "]");
}
// Check if method is public
if (!Modifier.isPublic(methods[i].getModifiers())) {
- fail("Method [" + methods[i].getName() +
- "] should be declared public");
+ fail("Method [" + methods[i].getName()
+ + "] should be declared public");
}
// Check parameters
Class[] parameters = methods[i].getParameterTypes();
if (parameters.length != 1) {
- fail("The begin method [" + methods[i].getName() +
- "] must accept a single parameter derived from " +
- "class [" + WebRequest.class.getName() + "], " +
- "but " + parameters.length + " parameters were found");
+ fail("The begin method [" + methods[i].getName()
+ + "] must accept a single parameter derived from "
+ + "class [" + WebRequest.class.getName() + "], "
+ + "but " + parameters.length
+ + " parameters were found");
} else if (!theRequest.getClass().isAssignableFrom(
parameters[0])) {
- fail("The begin method [" + methods[i].getName() +
- "] must accept a single parameter derived from " +
- "class [" + theRequest.getClass().getName() + "], " +
- "but found a [" + parameters[0].getName() + "] " +
- "parameter instead");
+ fail("The begin method [" + methods[i].getName()
+ + "] must accept a single parameter derived from "
+ + "class [" + theRequest.getClass().getName() + "], "
+ + "but found a [" + parameters[0].getName() + "] "
+ + "parameter instead");
}
try {
@@ -319,13 +320,13 @@
new Class[0]);
} catch (NoSuchMethodException e) {
- fail("Method [" + this.getCurrentTestMethod() +
- "()] does not exist for class [" +
- this.getClass().getName() + "].");
+ fail("Method [" + this.getCurrentTestMethod()
+ + "()] does not exist for class ["
+ + this.getClass().getName() + "].");
}
if (runMethod != null && !Modifier.isPublic(runMethod.getModifiers())) {
- fail("Method [" + this.getCurrentTestMethod() +
- "()] should be public");
+ fail("Method [" + this.getCurrentTestMethod()
+ + "()] should be public");
}
try {
1.6 +18 -18 jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractWebTestCase.java
Index: AbstractWebTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractWebTestCase.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractWebTestCase.java 21 Jul 2002 11:36:54 -0000 1.5
+++ AbstractWebTestCase.java 21 Jul 2002 12:09:16 -0000 1.6
@@ -113,15 +113,15 @@
// Check return type
if (!methods[i].getReturnType().getName().equals("void")) {
- fail("The end method [" + methods[i].getName() +
- "] should return void and not [" +
- methods[i].getReturnType().getName() + "]");
+ fail("The end method [" + methods[i].getName()
+ + "] should return void and not ["
+ + methods[i].getReturnType().getName() + "]");
}
// Check if method is public
if (!Modifier.isPublic(methods[i].getModifiers())) {
- fail("Method [" + methods[i].getName() +
- "] should be declared public");
+ fail("Method [" + methods[i].getName()
+ + "] should be declared public");
}
// Check parameters
@@ -129,8 +129,8 @@
// Verify only one parameter is defined
if (parameters.length != 1) {
- fail("The end method [" + methods[i].getName() +
- "] must only have a single parameter");
+ fail("The end method [" + methods[i].getName()
+ + "] must only have a single parameter");
}
// Is it a Http Unit WebResponse ?
@@ -153,16 +153,16 @@
// Else it is an error ...
} else {
- fail("The end method [" + methods[i].getName() +
- "] has a bad parameter of type [" +
- parameters[0].getName() + "]");
+ fail("The end method [" + methods[i].getName()
+ + "] has a bad parameter of type ["
+ + parameters[0].getName() + "]");
}
// Has a method to call already been found ?
if (methodToCall != null) {
- fail("There can only be one end method per test case. " +
- "Test case [" + this.getCurrentTestMethod() +
- "] has two at least !");
+ fail("There can only be one end method per test case. "
+ + "Test case [" + this.getCurrentTestMethod()
+ + "] has two at least !");
}
methodToCall = methods[i];
@@ -209,10 +209,10 @@
new Class[]{URLConnection.class});
webResponse = method.invoke(null, new Object[]{theConnection});
} catch (Exception e) {
- throw new ChainedRuntimeException("Error calling " +
- "[public static com.meterware.httpunit.WebResponse " +
- "com.meterware.httpunit.WebResponse.newResponse(" +
- "java.net.URLConnection) throws java.io.IOException]", e);
+ throw new ChainedRuntimeException("Error calling "
+ + "[public static com.meterware.httpunit.WebResponse "
+ + "com.meterware.httpunit.WebResponse.newResponse("
+ + "java.net.URLConnection) throws java.io.IOException]", e);
}
return webResponse;
1.2 +8 -8 jakarta-cactus/framework/src/java/share/org/apache/cactus/Cookie.java
Index: Cookie.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/Cookie.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Cookie.java 1 Mar 2002 00:43:45 -0000 1.1
+++ Cookie.java 21 Jul 2002 12:09:16 -0000 1.2
@@ -313,8 +313,8 @@
*/
public boolean isExpired()
{
- return (this.getExpiryDate() != null &&
- this.getExpiryDate().getTime() <= System.currentTimeMillis());
+ return (this.getExpiryDate() != null
+ && this.getExpiryDate().getTime() <= System.currentTimeMillis());
}
/**
@@ -324,8 +324,8 @@
*/
public int hashCode()
{
- return (this.getName().hashCode() + this.getValue().hashCode() +
- this.getDomain().hashCode());
+ return (this.getName().hashCode() + this.getValue().hashCode()
+ + this.getDomain().hashCode());
}
/**
@@ -339,9 +339,9 @@
{
if ((theObject != null) && (theObject instanceof Cookie)) {
Cookie other = (Cookie) theObject;
- return (this.getName().equals(other.getName()) &&
- this.getPath().equals(other.getPath()) &&
- this.getDomain().equals(other.getDomain()));
+ return (this.getName().equals(other.getName())
+ && this.getPath().equals(other.getPath())
+ && this.getDomain().equals(other.getDomain()));
}
return false;
}
1.4 +7 -7 jakarta-cactus/framework/src/java/share/org/apache/cactus/WebRequest.java
Index: WebRequest.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/WebRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WebRequest.java 5 May 2002 14:28:50 -0000 1.3
+++ WebRequest.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -333,8 +333,8 @@
} else if (theMethod.equalsIgnoreCase(WebRequest.GET_METHOD)) {
parameters = this.parametersGet;
} else {
- throw new ChainedRuntimeException("The method need to be either " +
- "\"POST\" or \"GET\"");
+ throw new ChainedRuntimeException("The method need to be either "
+ + "\"POST\" or \"GET\"");
}
// If there is already a parameter of the same name, add the
@@ -650,8 +650,8 @@
addParameter(nameValue.substring(0, breakParam),
nameValue.substring(breakParam + 1));
} else {
- throw new RuntimeException("Bad QueryString [" +
- theQueryString + "] NameValue pair: [" + nameValue + "]");
+ throw new RuntimeException("Bad QueryString ["
+ + theQueryString + "] NameValue pair: [" + nameValue + "]");
}
}
}
@@ -762,8 +762,8 @@
for (int i = 0; i < parameterValues.length - 1; i++) {
buffer.append("[" + parameterValues[i] + "], ");
}
- buffer.append("[" + parameterValues[parameterValues.length - 1] +
- "]]");
+ buffer.append("[" + parameterValues[parameterValues.length - 1]
+ + "]]");
buffer.append("]");
}
1.3 +4 -4 jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java
Index: WebResponse.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WebResponse.java 21 Apr 2002 12:45:44 -0000 1.2
+++ WebResponse.java 21 Jul 2002 12:09:16 -0000 1.3
@@ -239,9 +239,9 @@
LOGGER.debug("Header name = [" + headerName + "]");
LOGGER.debug("Header value = [" + headerValue + "]");
- if ((headerName != null) &&
- (headerName.toLowerCase().equals("set-cookie") ||
- headerName.toLowerCase().equals("set-cookie2"))) {
+ if ((headerName != null)
+ && (headerName.toLowerCase().equals("set-cookie")
+ || headerName.toLowerCase().equals("set-cookie2"))) {
// Parse the cookie definition
org.apache.commons.httpclient.Cookie[] cookies;
1.4 +7 -7 jakarta-cactus/framework/src/java/share/org/apache/cactus/WebTestResult.java
Index: WebTestResult.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/WebTestResult.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WebTestResult.java 22 May 2002 19:53:51 -0000 1.3
+++ WebTestResult.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -198,8 +198,8 @@
StringBuffer buffer = new StringBuffer();
if (hasException()) {
- buffer.append("Test failed, Exception message = [" +
- getExceptionMessage() + "]");
+ buffer.append("Test failed, Exception message = ["
+ + getExceptionMessage() + "]");
} else {
buffer.append("Test ok");
}
@@ -217,15 +217,15 @@
xmlText.append("<" + XML_ROOT_ELEMENT + ">");
if (hasException()) {
- xmlText.append("<" + XML_EXCEPTION_ELEMENT + " " +
- XML_EXCEPTION_CLASSNAME_ATTRIBUTE + "=\"");
+ xmlText.append("<" + XML_EXCEPTION_ELEMENT + " "
+ + XML_EXCEPTION_CLASSNAME_ATTRIBUTE + "=\"");
xmlText.append(this.exceptionClassName);
xmlText.append("\">");
xmlText.append("<" + XML_EXCEPTION_MESSAGE_ELEMENT + "><![CDATA[");
xmlText.append(this.exceptionMessage);
xmlText.append("]]></" + XML_EXCEPTION_MESSAGE_ELEMENT + ">");
- xmlText.append("<" + XML_EXCEPTION_STACKTRACE_ELEMENT +
- "><![CDATA[");
+ xmlText.append("<" + XML_EXCEPTION_STACKTRACE_ELEMENT
+ + "><![CDATA[");
xmlText.append(this.exceptionStackTrace);
xmlText.append("]]></" + XML_EXCEPTION_STACKTRACE_ELEMENT + ">");
xmlText.append("</" + XML_EXCEPTION_ELEMENT + ">");
1.8 +6 -6 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/AbstractHttpClient.java
Index: AbstractHttpClient.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/AbstractHttpClient.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractHttpClient.java 21 Jul 2002 11:36:54 -0000 1.7
+++ AbstractHttpClient.java 21 Jul 2002 12:09:16 -0000 1.8
@@ -113,11 +113,11 @@
try {
result = callGetResult(theRequest.getAuthentication());
} catch (ParsingException e) {
- throw new ChainedRuntimeException("Failed to get the test " +
- "results. This is probably due to an error that happened on " +
- "the server side when trying to execute the tests. Here is " +
- "what was returned by the server : [" +
- new WebResponse(theRequest, connection).getText() + "]", e);
+ throw new ChainedRuntimeException("Failed to get the test "
+ + "results. This is probably due to an error that happened on "
+ + "the server side when trying to execute the tests. Here is "
+ + "what was returned by the server : ["
+ + new WebResponse(theRequest, connection).getText() + "]", e);
}
// Check if the returned result object returned contains an error or
1.3 +3 -3 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/AutoReadHttpURLConnection.java
Index: AutoReadHttpURLConnection.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/AutoReadHttpURLConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AutoReadHttpURLConnection.java 21 Apr 2002 12:45:44 -0000 1.2
+++ AutoReadHttpURLConnection.java 21 Jul 2002 12:09:16 -0000 1.3
@@ -206,8 +206,8 @@
// that all servers that return no content-length header also do
// not block on read() operations !
- LOGGER.debug("Content-Length : [" +
- this.delegate.getContentLength() + "]");
+ LOGGER.debug("Content-Length : ["
+ + this.delegate.getContentLength() + "]");
if (this.delegate.getContentLength() != 0) {
1.5 +9 -9 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/HttpClientHelper.java
Index: HttpClientHelper.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/HttpClientHelper.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HttpClientHelper.java 21 Apr 2002 12:45:44 -0000 1.4
+++ HttpClientHelper.java 21 Jul 2002 12:09:16 -0000 1.5
@@ -138,8 +138,8 @@
// - If at least one parameter is to be sent in the request body, then
// we are doing a POST.
// - If user data has been specified, then we are doing a POST
- if (theRequest.getParameterNamesPost().hasMoreElements() ||
- (theRequest.getUserData() != null)) {
+ if (theRequest.getParameterNamesPost().hasMoreElements()
+ || (theRequest.getUserData() != null)) {
connection.setDoOutput(true);
} else {
@@ -332,12 +332,12 @@
out = theConnection.getOutputStream();
} catch (IOException e) {
// Cannot connect to server, try to explain why ...
- String reason = "Cannot connect to URL [" + theConnection.getURL() +
- "]. Reason : [" + e.getMessage() + "]\r\n";
+ String reason = "Cannot connect to URL [" + theConnection.getURL()
+ + "]. Reason : [" + e.getMessage() + "]\r\n";
reason += "Possible reasons :\r\n";
reason += "\t- The server is not running,\r\n";
- reason += "\t- The server redirector is not correctly mapped in " +
- "web.xml,\r\n";
+ reason += "\t- The server redirector is not correctly mapped in "
+ + "web.xml,\r\n";
reason += "\t- Something else ... !";
throw new ChainedRuntimeException(reason);
@@ -403,8 +403,8 @@
HttpClientHelper.getPath(theRequest, theConnection),
httpclientCookies);
- LOGGER.debug("Cookie string = [" + cookieHeader.getValue() +
- "]");
+ LOGGER.debug("Cookie string = [" + cookieHeader.getValue()
+ + "]");
theConnection.setRequestProperty("Cookie",
cookieHeader.getValue());
1.4 +3 -3 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/JspHttpClient.java
Index: JspHttpClient.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/JspHttpClient.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JspHttpClient.java 5 May 2002 14:28:50 -0000 1.3
+++ JspHttpClient.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -82,8 +82,8 @@
// Check if user has overriden the servlet redirector
if (theRequest.getRedirectorName() != null) {
- url = JspConfiguration.getContextURL() + "/" +
- theRequest.getRedirectorName();
+ url = JspConfiguration.getContextURL() + "/"
+ + theRequest.getRedirectorName();
} else {
url = JspConfiguration.getJspRedirectorURL();
}
1.4 +3 -3 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/ServletHttpClient.java
Index: ServletHttpClient.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/ServletHttpClient.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ServletHttpClient.java 5 May 2002 14:28:50 -0000 1.3
+++ ServletHttpClient.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -82,8 +82,8 @@
// Check if user has overriden the servlet redirector
if (theRequest.getRedirectorName() != null) {
- url = ServletConfiguration.getContextURL() + "/" +
- theRequest.getRedirectorName();
+ url = ServletConfiguration.getContextURL() + "/"
+ + theRequest.getRedirectorName();
} else {
url = ServletConfiguration.getServletRedirectorURL();
}
1.5 +15 -15 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/WebTestResultParser.java
Index: WebTestResultParser.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/WebTestResultParser.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WebTestResultParser.java 16 Jun 2002 12:59:15 -0000 1.4
+++ WebTestResultParser.java 21 Jul 2002 12:09:16 -0000 1.5
@@ -131,8 +131,8 @@
// before perfoming the checks.
String trimmedData = theData.trim();
- if (trimmedData.startsWith(startRootString) &&
- trimmedData.endsWith(endRootString)) {
+ if (trimmedData.startsWith(startRootString)
+ && trimmedData.endsWith(endRootString)) {
buffer = trimmedData.substring(startRootString.length(),
trimmedData.length() - endRootString.length());
@@ -154,8 +154,8 @@
protected String readExceptionClassname(String theData)
throws ParsingException
{
- String startString = "<" + WebTestResult.XML_EXCEPTION_ELEMENT +
- " " + WebTestResult.XML_EXCEPTION_CLASSNAME_ATTRIBUTE + "=\"";
+ String startString = "<" + WebTestResult.XML_EXCEPTION_ELEMENT
+ + " " + WebTestResult.XML_EXCEPTION_CLASSNAME_ATTRIBUTE + "=\"";
String endString = "</" + WebTestResult.XML_EXCEPTION_ELEMENT + ">";
String buffer;
@@ -163,8 +163,8 @@
int pos = theData.indexOf('\"', startString.length());
this.exceptionClassname = theData.substring(startString.length(),
pos);
- buffer = theData.substring(startString.length() +
- this.exceptionClassname.length() + 2,
+ buffer = theData.substring(startString.length()
+ + this.exceptionClassname.length() + 2,
theData.length() - endString.length());
} else {
throw new ParsingException("Not a valid response");
@@ -184,10 +184,10 @@
protected String readExceptionMessage(String theData)
throws ParsingException
{
- String startString = "<" + WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT +
- "><![CDATA[";
- String endString = "]]></" +
- WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT + ">";
+ String startString = "<" + WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT
+ + "><![CDATA[";
+ String endString = "]]></"
+ + WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT + ">";
String buffer;
if (theData.startsWith(startString)) {
@@ -213,10 +213,10 @@
protected String readExceptionStacktrace(String theData)
throws ParsingException
{
- String startString = "<" +
- WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT + "><![CDATA[";
- String endString = "]]></" +
- WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT + ">";
+ String startString = "<"
+ + WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT + "><![CDATA[";
+ String endString = "]]></"
+ + WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT + ">";
String buffer;
if (theData.startsWith(startString)) {
1.3 +6 -6 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/authentication/BasicAuthentication.java
Index: BasicAuthentication.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/authentication/BasicAuthentication.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BasicAuthentication.java 14 Apr 2002 10:46:25 -0000 1.2
+++ BasicAuthentication.java 21 Jul 2002 12:09:16 -0000 1.3
@@ -144,9 +144,9 @@
for (char c = iter.first(); c != CharacterIterator.DONE;
c = iter.next()) {
- if ((illegalChars.indexOf(c) != -1) ||
- ((c >= 0) && (c <= 31)) ||
- (c == 127)) {
+ if ((illegalChars.indexOf(c) != -1)
+ || ((c >= 0) && (c <= 31))
+ || (c == 127)) {
// Bad theName! Go to your room!
throw new IllegalArgumentException(
@@ -215,8 +215,8 @@
// see setName and setPassword for details of token and TEXT
String basicCookie = getName() + ":" + getPassword();
- String basicCredentials = "Basic " +
- new String(base64Encode(basicCookie.getBytes()));
+ String basicCredentials = "Basic "
+ + new String(base64Encode(basicCookie.getBytes()));
theConnection.setRequestProperty("Authorization", basicCredentials);
}
1.4 +17 -17 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java
Index: AbstractHttpServletRequestWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractHttpServletRequestWrapper.java 22 May 2002 19:53:51 -0000 1.3
+++ AbstractHttpServletRequestWrapper.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -207,8 +207,8 @@
if ((this.url != null) && (this.url.getServerName() != null)) {
result = this.url.getHost();
- LOGGER.debug("Using simulated server name : [" + result +
- "]");
+ LOGGER.debug("Using simulated server name : [" + result
+ + "]");
} else {
result = this.request.getServerName();
}
@@ -245,9 +245,9 @@
if (this.url != null) {
- result = getContextPath() +
- ((getServletPath() == null) ? "" : getServletPath()) +
- ((getPathInfo() == null) ? "" : getPathInfo());
+ result = getContextPath()
+ + ((getServletPath() == null) ? "" : getServletPath())
+ + ((getPathInfo() == null) ? "" : getPathInfo());
LOGGER.debug("Using simulated request URI : [" + result + "]");
} else {
@@ -267,8 +267,8 @@
if (this.url != null) {
result = this.url.getServletPath();
- LOGGER.debug("Using simulated servlet path : [" + result +
- "]");
+ LOGGER.debug("Using simulated servlet path : [" + result
+ + "]");
} else {
result = this.request.getServletPath();
}
@@ -295,15 +295,15 @@
} else {
// Compute the translated path using the root real path
- String newPathInfo = (pathInfo.startsWith("/") ?
- pathInfo.substring(1) : pathInfo);
+ String newPathInfo = (pathInfo.startsWith("/")
+ ? pathInfo.substring(1) : pathInfo);
if (this.request.getRealPath("/").endsWith("/")) {
- pathTranslated = this.request.getRealPath("/") +
- newPathInfo.replace('/', File.separatorChar);
+ pathTranslated = this.request.getRealPath("/")
+ + newPathInfo.replace('/', File.separatorChar);
} else {
- pathTranslated = this.request.getRealPath("/") +
- File.separatorChar + newPathInfo.replace('/',
- File.separatorChar);
+ pathTranslated = this.request.getRealPath("/")
+ + File.separatorChar + newPathInfo.replace('/',
+ File.separatorChar);
}
}
} else {
@@ -323,8 +323,8 @@
if (this.url != null) {
result = this.url.getQueryString();
- LOGGER.debug("Using simulated query string : [" + result +
- "]");
+ LOGGER.debug("Using simulated query string : [" + result
+ + "]");
} else {
result = this.request.getQueryString();
}
1.6 +18 -17 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractWebTestCaller.java
Index: AbstractWebTestCaller.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractWebTestCaller.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractWebTestCaller.java 21 Jul 2002 11:36:55 -0000 1.5
+++ AbstractWebTestCaller.java 21 Jul 2002 12:09:16 -0000 1.6
@@ -197,8 +197,8 @@
writer.close();
} catch (IOException e) {
- String message = "Error writing WebTestResult instance to output " +
- "stream";
+ String message = "Error writing WebTestResult instance to output "
+ + "stream";
LOGGER.error(message, e);
throw new ServletException(message, e);
}
@@ -230,8 +230,8 @@
HttpServiceDefinition.CLASS_NAME_PARAM);
if (className == null) {
- String message = "Missing class name parameter [" +
- HttpServiceDefinition.CLASS_NAME_PARAM + "] in HTTP request.";
+ String message = "Missing class name parameter ["
+ + HttpServiceDefinition.CLASS_NAME_PARAM + "] in HTTP request.";
LOGGER.error(message);
throw new ServletException(message);
}
@@ -255,8 +255,9 @@
HttpServiceDefinition.METHOD_NAME_PARAM);
if (methodName == null) {
- String message = "Missing method name parameter [" +
- HttpServiceDefinition.METHOD_NAME_PARAM + "] in HTTP request.";
+ String message = "Missing method name parameter ["
+ + HttpServiceDefinition.METHOD_NAME_PARAM
+ + "] in HTTP request.";
LOGGER.error(message);
throw new ServletException(message);
}
@@ -305,8 +306,8 @@
testInstance = (AbstractTestCase) constructor.newInstance(
new Object[]{theTestCaseName});
} catch (Exception e) {
- String message = "Error instantiating class [" + theClassName +
- "(" + theTestCaseName + ")]";
+ String message = "Error instantiating class [" + theClassName
+ + "(" + theTestCaseName + ")]";
LOGGER.error(message, e);
throw new ServletException(message, e);
}
@@ -330,14 +331,14 @@
testClass = ClassLoaderUtils.loadClass(theClassName,
this.getClass());
} catch (Exception e) {
- String message = "Error finding class [" + theClassName +
- "] using both the Context classloader and the webapp " +
- "classloader. Possible causes include:\r\n";
- message += "\t- Your webapp does not include your test " +
- "classes,\r\n";
- message += "\t- The cactus.jar is not located in your " +
- "WEB-INF/lib directory and your Container has not set the " +
- "Context classloader to point to the webapp one";
+ String message = "Error finding class [" + theClassName
+ + "] using both the Context classloader and the webapp "
+ + "classloader. Possible causes include:\r\n";
+ message += "\t- Your webapp does not include your test "
+ + "classes,\r\n";
+ message += "\t- The cactus.jar is not located in your "
+ + "WEB-INF/lib directory and your Container has not set the "
+ + "Context classloader to point to the webapp one";
LOGGER.error(message, e);
throw new ServletException(message, e);
1.2 +3 -3 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/ServletUtil.java
Index: ServletUtil.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/ServletUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServletUtil.java 1 Mar 2002 00:43:46 -0000 1.1
+++ ServletUtil.java 21 Jul 2002 12:09:16 -0000 1.2
@@ -116,8 +116,8 @@
try {
value = URLDecoder.decode(value);
} catch (Exception e) {
- throw new ChainedRuntimeException("Error URL decoding [" +
- value + "]", e);
+ throw new ChainedRuntimeException("Error URL decoding ["
+ + value + "]", e);
}
}
1.4 +8 -8 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/runner/ServletTestRunner.java
Index: ServletTestRunner.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/runner/ServletTestRunner.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ServletTestRunner.java 19 May 2002 20:34:14 -0000 1.3
+++ ServletTestRunner.java 21 Jul 2002 12:09:16 -0000 1.4
@@ -114,8 +114,8 @@
// Verify if a suite parameter exists
String suiteClassName = theRequest.getParameter(HTTP_SUITE_PARAM);
if (suiteClassName == null) {
- throw new ServletException("Missing HTTP parameter [" +
- HTTP_SUITE_PARAM + "] in request");
+ throw new ServletException("Missing HTTP parameter ["
+ + HTTP_SUITE_PARAM + "] in request");
}
// Get the XSL stylesheet parameter if any
@@ -124,8 +124,8 @@
// Set up default Cactus System properties so that there is no need
// to have a cactus.properties file in WEB-INF/classes
System.setProperty(Configuration.CACTUS_CONTEXT_URL_PROPERTY,
- "http://" + theRequest.getServerName() + ":" +
- theRequest.getServerPort() + theRequest.getContextPath());
+ "http://" + theRequest.getServerName() + ":"
+ + theRequest.getServerPort() + theRequest.getContextPath());
// Run the tests
String xml = run(suiteClassName, xslParam);
@@ -162,9 +162,9 @@
Test suite = testRunner.getTest(theSuiteClassName);
if (suite == null) {
- throw new ServletException("Failed to load test suite [" +
- theSuiteClassName + "], Reason is [" +
- testRunner.getErrorMessage() + "]");
+ throw new ServletException("Failed to load test suite ["
+ + theSuiteClassName + "], Reason is ["
+ + testRunner.getErrorMessage() + "]");
}
// Run the tests
1.3 +18 -18 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/runner/XMLFormatter.java
Index: XMLFormatter.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/runner/XMLFormatter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLFormatter.java 19 May 2002 17:16:01 -0000 1.2
+++ XMLFormatter.java 21 Jul 2002 12:09:16 -0000 1.3
@@ -177,19 +177,19 @@
StringBuffer xml = new StringBuffer();
if (this.xslFileName != null) {
- xml.append("<?xml-stylesheet type=\"text/xsl\" " +
- "href=\"" + this.xslFileName + "\"?>");
+ xml.append("<?xml-stylesheet type=\"text/xsl\" "
+ + "href=\"" + this.xslFileName + "\"?>");
}
xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
xml.append("<" + TESTSUITES + ">");
- xml.append("<" + TESTSUITE + " " + ATTR_NAME + "=\"" +
- getSuiteClassName() + "\" " + ATTR_TESTS + "=\"" +
- theResult.runCount() + "\" " + ATTR_FAILURES + "=\"" +
- theResult.failureCount() + "\" " + ATTR_ERRORS + "=\"" +
- theResult.errorCount() + "\" " + ATTR_TIME + "=\"" +
- getTotalDurationAsString() + "\">");
+ xml.append("<" + TESTSUITE + " " + ATTR_NAME + "=\""
+ + getSuiteClassName() + "\" " + ATTR_TESTS + "=\""
+ + theResult.runCount() + "\" " + ATTR_FAILURES + "=\""
+ + theResult.failureCount() + "\" " + ATTR_ERRORS + "=\""
+ + theResult.errorCount() + "\" " + ATTR_TIME + "=\""
+ + getTotalDurationAsString() + "\">");
xml.append(this.currentTestCaseResults.toString());
@@ -221,9 +221,9 @@
TestFailure failure = new TestFailure(theTest, theThrowable);
StringBuffer xml = new StringBuffer();
- xml.append("<" + ERROR + " " + ATTR_MESSAGE + "=\"" +
- xmlEncode(failure.exceptionMessage()) + "\" " + ATTR_TYPE + "=\"" +
- failure.thrownException().getClass().getName() + "\">");
+ xml.append("<" + ERROR + " " + ATTR_MESSAGE + "=\""
+ + xmlEncode(failure.exceptionMessage()) + "\" " + ATTR_TYPE + "=\""
+ + failure.thrownException().getClass().getName() + "\">");
xml.append(xmlEncode(failure.trace()));
xml.append("</" + ERROR + ">");
@@ -241,9 +241,9 @@
TestFailure failure = new TestFailure(theTest, theError);
StringBuffer xml = new StringBuffer();
- xml.append("<" + FAILURE + " " + ATTR_MESSAGE + "=\"" +
- xmlEncode(failure.exceptionMessage()) + "\" " + ATTR_TYPE + "=\"" +
- failure.thrownException().getClass().getName() + "\">");
+ xml.append("<" + FAILURE + " " + ATTR_MESSAGE + "=\""
+ + xmlEncode(failure.exceptionMessage()) + "\" " + ATTR_TYPE + "=\""
+ + failure.thrownException().getClass().getName() + "\">");
xml.append(xmlEncode(failure.trace()));
xml.append("</" + FAILURE + ">");
@@ -261,9 +261,9 @@
String duration = getDurationAsString(
System.currentTimeMillis() - this.currentTestStartTime);
- xml.append("<" + TESTCASE + " " + ATTR_NAME + "=\"" +
- JUnitVersionHelper.getTestCaseName(theTest) + "\" " + ATTR_TIME +
- "=\"" + duration + "\">");
+ xml.append("<" + TESTCASE + " " + ATTR_NAME + "=\""
+ + JUnitVersionHelper.getTestCaseName(theTest) + "\" " + ATTR_TIME
+ + "=\"" + duration + "\">");
if (this.currentTestFailure != null) {
xml.append(this.currentTestFailure);
1.2 +5 -5 jakarta-cactus/framework/src/java/share/org/apache/cactus/util/AssertUtils.java
Index: AssertUtils.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/util/AssertUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AssertUtils.java 1 Mar 2002 00:43:47 -0000 1.1
+++ AssertUtils.java 21 Jul 2002 12:09:16 -0000 1.2
@@ -203,8 +203,8 @@
int pos = param.indexOf("=");
if (pos < 0) {
- System.err.println("Bad 'Set-Cookie' syntax, missing '=' [" +
- param + "]");
+ System.err.println("Bad 'Set-Cookie' syntax, missing '=' ["
+ + param + "]");
continue;
}
@@ -242,8 +242,8 @@
} else if (left.equalsIgnoreCase("version")) {
version = Float.parseFloat(right);
} else {
- System.err.println("Bad 'Set-Cookie' syntax, bad name [" +
- param + "]");
+ System.err.println("Bad 'Set-Cookie' syntax, bad name ["
+ + param + "]");
continue;
}
1.8 +5 -5 jakarta-cactus/framework/src/java/share/org/apache/cactus/util/Configuration.java
Index: Configuration.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/util/Configuration.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Configuration.java 7 Jun 2002 20:25:24 -0000 1.7
+++ Configuration.java 21 Jul 2002 12:09:16 -0000 1.8
@@ -134,8 +134,8 @@
new FileInputStream(configOverride));
} catch (IOException e) {
throw new ChainedRuntimeException(
- "Cannot read cactus configuration file [" +
- configOverride + "]", e);
+ "Cannot read cactus configuration file ["
+ + configOverride + "]", e);
}
}
@@ -166,8 +166,8 @@
// from the Cactus configuration file.
String contextURL = System.getProperty(CACTUS_CONTEXT_URL_PROPERTY);
if (contextURL == null) {
- new ChainedRuntimeException("Missing Cactus property [" +
- CACTUS_CONTEXT_URL_PROPERTY + "]");
+ new ChainedRuntimeException("Missing Cactus property ["
+ + CACTUS_CONTEXT_URL_PROPERTY + "]");
}
return contextURL;
}
1.6 +4 -4 jakarta-cactus/framework/src/java/share/org/apache/cactus/util/log/LogService.java
Index: LogService.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/util/log/LogService.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LogService.java 27 May 2002 15:23:35 -0000 1.5
+++ LogService.java 21 Jul 2002 12:09:16 -0000 1.6
@@ -134,9 +134,9 @@
} else {
// Failed to configure logging system, simply print
// a warning on stderr
- System.err.println("[warning] Failed to configure " +
- "logging system : Could not find file [" +
- theFileName + "]");
+ System.err.println("[warning] Failed to configure "
+ + "logging system : Could not find file ["
+ + theFileName + "]");
}
}
1.4 +27 -27 jakarta-cactus/framework/src/test/share/org/apache/cactus/TestAbstractTestCaseInterceptorTestCase.java
Index: TestAbstractTestCaseInterceptorTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/test/share/org/apache/cactus/TestAbstractTestCaseInterceptorTestCase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestAbstractTestCaseInterceptorTestCase.java 28 Apr 2002 20:19:17 -0000 1.3
+++ TestAbstractTestCaseInterceptorTestCase.java 21 Jul 2002 12:09:17 -0000 1.4
@@ -130,8 +130,8 @@
} catch (AssertionFailedError e) {
// Perform asserts
- if (!verifyBeginMethodsOk(e.getMessage()) &&
- !verifyEndMethodsOk(e.getMessage())) {
+ if (!verifyBeginMethodsOk(e.getMessage())
+ && !verifyEndMethodsOk(e.getMessage())) {
throw e;
}
@@ -154,9 +154,9 @@
if (this.getCurrentTestMethod().equals(
"testBeginMethodBadReturnType")) {
- assertEquals("The begin method " +
- "[beginBeginMethodBadReturnType] should return void and " +
- "not [java.lang.String]", theMessage);
+ assertEquals("The begin method "
+ + "[beginBeginMethodBadReturnType] should return void and "
+ + "not [java.lang.String]", theMessage);
return true;
}
@@ -165,8 +165,8 @@
if (this.getCurrentTestMethod().equals(
"testBeginMethodNotPublic")) {
- assertEquals("Method [beginBeginMethodNotPublic] should be " +
- "declared public", theMessage);
+ assertEquals("Method [beginBeginMethodNotPublic] should be "
+ + "declared public", theMessage);
return true;
}
@@ -176,11 +176,11 @@
if (this.getCurrentTestMethod().equals(
"testBeginMethodBadParamType")) {
- assertEquals("The begin method " +
- "[beginBeginMethodBadParamType] must accept a single " +
- "parameter derived from class " +
- "[org.apache.cactus.WebRequest], but " +
- "found a [java.lang.String] parameter instead",
+ assertEquals("The begin method "
+ + "[beginBeginMethodBadParamType] must accept a single "
+ + "parameter derived from class "
+ + "[org.apache.cactus.WebRequest], but "
+ + "found a [java.lang.String] parameter instead",
theMessage);
return true;
}
@@ -191,11 +191,11 @@
if (this.getCurrentTestMethod().equals(
"testBeginMethodBadParamNumber")) {
- assertEquals("The begin method " +
- "[beginBeginMethodBadParamNumber] must accept a single " +
- "parameter derived from class " +
- "[org.apache.cactus.WebRequest], but 2 " +
- "parameters were found",
+ assertEquals("The begin method "
+ + "[beginBeginMethodBadParamNumber] must accept a single "
+ + "parameter derived from class "
+ + "[org.apache.cactus.WebRequest], but 2 "
+ + "parameters were found",
theMessage);
return true;
}
@@ -224,17 +224,17 @@
if (this.getCurrentTestMethod().equals(
"testEndMethodBadReturnType")) {
- assertEquals("The end method " +
- "[endEndMethodBadReturnType] should return void and " +
- "not [java.lang.String]", theMessage);
+ assertEquals("The end method "
+ + "[endEndMethodBadReturnType] should return void and "
+ + "not [java.lang.String]", theMessage);
return true;
}
// Test that when an end method for a given test is not declared
// public a <code>AssertionFailedError</code> exception is returned.
if (this.getCurrentTestMethod().equals("testEndMethodNotPublic")) {
- assertEquals("Method [endEndMethodNotPublic] should be " +
- "declared public", theMessage);
+ assertEquals("Method [endEndMethodNotPublic] should be "
+ + "declared public", theMessage);
return true;
}
@@ -244,8 +244,8 @@
if (this.getCurrentTestMethod().equals(
"testEndMethodBadParamType")) {
- assertEquals("The end method [endEndMethodBadParamType] " +
- "has a bad parameter of type [java.lang.String]",
+ assertEquals("The end method [endEndMethodBadParamType] "
+ + "has a bad parameter of type [java.lang.String]",
theMessage);
return true;
}
@@ -256,8 +256,8 @@
if (this.getCurrentTestMethod().equals(
"testEndMethodBadParamNumber")) {
- assertEquals("The end method [endEndMethodBadParamNumber] " +
- "must only have a single parameter", theMessage);
+ assertEquals("The end method [endEndMethodBadParamNumber] "
+ + "must only have a single parameter", theMessage);
return true;
}
1.2 +4 -4 jakarta-cactus/framework/src/test/share/org/apache/cactus/TestWebTestResult.java
Index: TestWebTestResult.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/test/share/org/apache/cactus/TestWebTestResult.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestWebTestResult.java 21 Apr 2002 12:45:44 -0000 1.1
+++ TestWebTestResult.java 21 Jul 2002 12:09:17 -0000 1.2
@@ -125,9 +125,9 @@
*/
public void testToXmlWithException()
{
- String expectedStart = "<webresult><exception classname=\"" +
- "java.lang.Exception\"><message><![CDATA[test exception]]>" +
- "</message><stacktrace><![CDATA[";
+ String expectedStart = "<webresult><exception classname=\""
+ + "java.lang.Exception\"><message><![CDATA[test exception]]>"
+ + "</message><stacktrace><![CDATA[";
String expectedEnd = "]]></stacktrace></exception></webresult>";
Exception e = new Exception("test exception");
1.3 +6 -6 jakarta-cactus/framework/src/test/share/org/apache/cactus/client/TestWebTestResultParser.java
Index: TestWebTestResultParser.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/src/test/share/org/apache/cactus/client/TestWebTestResultParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestWebTestResultParser.java 1 May 2002 19:52:27 -0000 1.2
+++ TestWebTestResultParser.java 21 Jul 2002 12:09:17 -0000 1.3
@@ -172,9 +172,9 @@
*/
public void testReadRootElementFull() throws ParsingException
{
- String expectedStart = "<exception classname=\"" +
- "java.lang.Exception\"><message><![CDATA[test exception]]>" +
- "</message><stacktrace><![CDATA[";
+ String expectedStart = "<exception classname=\""
+ + "java.lang.Exception\"><message><![CDATA[test exception]]>"
+ + "</message><stacktrace><![CDATA[";
String expectedEnd = "]]></stacktrace></exception>";
Exception e = new Exception("test exception");
@@ -195,8 +195,8 @@
*/
public void testReadExceptionClassName() throws ParsingException
{
- String expectedStart = "<message><![CDATA[test exception]]>" +
- "</message><stacktrace><![CDATA[";
+ String expectedStart = "<message><![CDATA[test exception]]>"
+ + "</message><stacktrace><![CDATA[";
String expectedEnd = "]]></stacktrace>";
Exception e = new Exception("test exception");
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>