1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-24 22:07:33 +00:00

Test simplification

This commit is contained in:
Arnaud Roques 2022-08-29 18:52:23 +02:00
parent 775d2e16c9
commit 401f44bf3c
3 changed files with 3 additions and 16 deletions

View File

@ -25,7 +25,7 @@ public class GraphmlTest {
private static final String TRIPLE_QUOTE = "\"\"\"";
protected String getXmlAndCheckXmlAndDescription(final String expectedDescription)
protected void checkXmlAndDescription(final String expectedDescription)
throws IOException, UnsupportedEncodingException {
final String actualResult = runPlantUML(expectedDescription);
final String xmlExpected = readStringFromSourceFile(getDiagramFile(), "{{{", "}}}");
@ -38,8 +38,6 @@ public class GraphmlTest {
if (sortString(actualResult).equals(sortString(xmlExpected)) == false) {
assertEquals(xmlExpected, actualResult, "Generated GraphML is not ok");
}
return actualResult;
}
private String sortString(String s) {

View File

@ -33,12 +33,7 @@ public class GML0000_Test extends GraphmlTest {
@Test
void testSimple() throws IOException {
final String xml = getXmlAndCheckXmlAndDescription("(1 entities)");
// Those tests are ULGY: please improve them!
assertTrue(xml.contains("<graphml "));
assertTrue(xml.contains("<graph edgedefault=\"undirected\">"));
assertTrue(xml.contains("<node id=\"comp1\"/>"));
checkXmlAndDescription("(1 entities)");
}
}

View File

@ -35,13 +35,7 @@ public class GML0001_Test extends GraphmlTest {
@Test
void testSimple() throws IOException {
final String xml = getXmlAndCheckXmlAndDescription("(2 entities)");
// Those tests are ULGY: please improve them!
assertTrue(xml.contains("<graphml "));
assertTrue(xml.contains("<graph edgedefault=\"undirected\">"));
assertTrue(xml.contains("<node id=\"comp1\"/>"));
assertTrue(xml.contains("<node id=\"comp2\"/>"));
checkXmlAndDescription("(2 entities)");
}
}