1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-09-29 07:19:07 +00:00
plantuml-server/src/test/java/net/sourceforge/plantuml/servlet/TestEPS.java

31 lines
923 B
Java
Raw Normal View History

2017-06-28 11:16:45 +00:00
package net.sourceforge.plantuml.servlet;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
2017-06-28 11:16:45 +00:00
public class TestEPS extends WebappTestCase {
2017-06-28 11:16:45 +00:00
/**
* Verifies the generation of the EPS for the Bob -> Alice sample
*/
public void testSimpleSequenceDiagram() throws IOException {
final URL url = new URL(getServerUrl() + "/eps/" + TestUtils.SEQBOB);
final URLConnection conn = url.openConnection();
2017-06-28 11:16:45 +00:00
// Analyze response
// Verifies the Content-Type header
assertEquals(
"Response content type is not EPS",
"application/postscript",
conn.getContentType().toLowerCase()
);
2017-06-28 11:16:45 +00:00
// Get the content and verify its size
String diagram = getContentText(conn);
2017-06-28 11:16:45 +00:00
int diagramLen = diagram.length();
assertTrue(diagramLen > 10000);
assertTrue(diagramLen < 12000);
}
2017-06-28 11:16:45 +00:00
}