[TASK] Checkstyle report and mvn site configuration
This commit is contained in:
@@ -8,17 +8,18 @@ import com.meterware.httpunit.WebResponse;
|
||||
public class TestMap extends WebappTestCase {
|
||||
/**
|
||||
* Verifies the generation of the MAP for the following sample:
|
||||
*
|
||||
*
|
||||
* participant Bob [[http://www.yahoo.com]]
|
||||
* Bob -> Alice : [[http://www.google.com]] hello
|
||||
*/
|
||||
public void testSimpleSequenceDiagram() throws Exception {
|
||||
WebConversation conversation = new WebConversation();
|
||||
WebRequest request = new GetMethodWebRequest(getServerUrl() + "map/AqWiAibCpYn8p2jHSCfFKeYEpYWfAR3IroylBzUhJCp8pzTBpi-DZUK2IUhQAJZcP2QdAbYXgalFpq_FIOKeLCX8pSd91m00");
|
||||
WebRequest request = new GetMethodWebRequest(getServerUrl()
|
||||
+ "map/AqWiAibCpYn8p2jHSCfFKeYEpYWfAR3IroylBzUhJCp8pzTBpi-DZUK2IUhQAJZcP2QdAbYXgalFpq_FIOKeLCX8pSd91m00");
|
||||
WebResponse response = conversation.getResource(request);
|
||||
// Analyze response
|
||||
// Verifies the Content-Type header
|
||||
assertEquals("Response content type is not TEXT PLAIN", "text/plain", response.getContentType());
|
||||
assertEquals("Response content type is not TEXT PLAIN", "text/plain", response.getContentType());
|
||||
assertEquals("Response character set is not UTF-8", "UTF-8", response.getCharacterSet());
|
||||
// Get the content, check its first characters and verify its size
|
||||
String diagram = response.getText();
|
||||
@@ -34,15 +35,17 @@ public class TestMap extends WebappTestCase {
|
||||
*/
|
||||
public void testSequenceDiagramContent() throws Exception {
|
||||
WebConversation conversation = new WebConversation();
|
||||
WebRequest request = new GetMethodWebRequest(getServerUrl() + "map/AqWiAibCpYn8p2jHSCfFKeYEpYWfAR3IroylBzUhJCp8pzTBpi-DZUK2IUhQAJZcP2QdAbYXgalFpq_FIOKeLCX8pSd91m00");
|
||||
WebRequest request = new GetMethodWebRequest(getServerUrl()
|
||||
+ "map/AqWiAibCpYn8p2jHSCfFKeYEpYWfAR3IroylBzUhJCp8pzTBpi-DZUK2IUhQAJZcP2QdAbYXgalFpq_FIOKeLCX8pSd91m00");
|
||||
WebResponse response = conversation.getResource(request);
|
||||
// Analyze response
|
||||
// Get the data contained in the XML
|
||||
String map = response.getText();
|
||||
assertTrue("Response is not a list of tags", map.matches("(<([^<>]+)>)+"));
|
||||
assertTrue("Response doesn't contain the area structure", map.matches(".*(area shape=\".+\" id=\".+\" href=\".+\").*"));
|
||||
assertTrue("Response doesn't contain the area structure",
|
||||
map.matches(".*(area shape=\".+\" id=\".+\" href=\".+\").*"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the empty MAP of a sequence diagram without link
|
||||
* This test uses the simple Bob -> Alice
|
||||
|
||||
Reference in New Issue
Block a user