update junit test classes and there dependencies

This commit is contained in:
Florian
2021-10-11 12:38:37 +02:00
committed by arnaudroques
parent 221af78afc
commit 8d5be87f03
20 changed files with 700 additions and 469 deletions

View File

@@ -1,11 +1,8 @@
package net.sourceforge.plantuml.servlet;
import com.meterware.httpunit.GetMethodWebRequest;
import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
import java.io.IOException;
import java.net.URL;
public class TestLanguage extends WebappTestCase {
@@ -13,10 +10,8 @@ public class TestLanguage extends WebappTestCase {
* Tests that the language for the current PlantUML server can be obtained through HTTP
*/
public void testRetrieveLanguage() throws IOException {
WebConversation conversation = new WebConversation();
WebRequest request = new GetMethodWebRequest(getServerUrl() + "/language");
WebResponse response = conversation.getResource(request);
String languageText = response.getText();
final URL url = new URL(getServerUrl() + "/language");
String languageText = getContentText(url);
assertTrue("Language contains @startuml", languageText.indexOf("@startuml") > 0);
}