mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 08:48:54 +00:00
[TASK] No more used method getServerUrl suppressed
This commit is contained in:
parent
ce168633ad
commit
e41286993f
@ -7,32 +7,20 @@ import com.meterware.httpunit.*;
|
|||||||
*/
|
*/
|
||||||
public class TestUtils {
|
public class TestUtils {
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the URL of the PlantUMLServlet, deployed on the testing web server in the following form
|
|
||||||
* http://server/contextroot/ Note the trailing slash (/)
|
|
||||||
*
|
|
||||||
* @return the URL
|
|
||||||
*/
|
|
||||||
public static String getServerUrl() {
|
|
||||||
return "http://localhost/plantuml/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try getting a response for the given Conversation and Request show an error message if a 404 error appears
|
* Try getting a response for the given Conversation and Request show an error message if a 404 error appears
|
||||||
*
|
*
|
||||||
* @param conversation
|
* @param conversation The conversation to use
|
||||||
* - the conversation to use
|
|
||||||
* @param request
|
* @param request
|
||||||
* @return the response
|
* @return The response
|
||||||
* @throws an
|
* @throws nfe If getting the response fails
|
||||||
* Exception if getting the response fails
|
|
||||||
*/
|
*/
|
||||||
public static WebResponse tryGetResponse(WebConversation conversation, WebRequest request) throws Exception {
|
public static WebResponse tryGetResponse(WebConversation conversation, WebRequest request) throws Exception {
|
||||||
WebResponse response = null;
|
WebResponse response = null;
|
||||||
try {
|
try {
|
||||||
response = conversation.getResponse(request);
|
response = conversation.getResponse(request);
|
||||||
} catch (HttpNotFoundException nfe) {
|
} catch (HttpNotFoundException nfe) {
|
||||||
System.err.println("The URL '" + request.getURL() + "' is not active any more");
|
System.err.println("The URL '" + request.getURL() + "' is no more active");
|
||||||
throw nfe;
|
throw nfe;
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
Loading…
Reference in New Issue
Block a user