Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Blouin2019-11-05 13:34:51 +0000
committerSalome Maro2020-03-06 15:50:48 +0000
commit52c403c9e752528f8af3793e19f5d6d198748f38 (patch)
tree79fc7f8c9198841dbfc36ea6c55aad30236e25f9
parentb7434d5eefdffa55f15268672b5596a16f89e2c4 (diff)
downloadorg.eclipse.capra-52c403c9e752528f8af3793e19f5d6d198748f38.tar.gz
org.eclipse.capra-52c403c9e752528f8af3793e19f5d6d198748f38.tar.xz
org.eclipse.capra-52c403c9e752528f8af3793e19f5d6d198748f38.zip
Using OS independent line separator for tests to pass on Windows
Signed-off-by: Dominique Blouin <dominique.blouin@laposte.net> Change-Id: I9cb9ea3d2183b1d3e4c483694104a1bb5fa4e01a
-rw-r--r--tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestGraphicalVisualization.java26
-rw-r--r--tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestTraceabiltyMatrix.java18
2 files changed, 24 insertions, 20 deletions
diff --git a/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestGraphicalVisualization.java b/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestGraphicalVisualization.java
index 6fc4109b..6dc25eb0 100644
--- a/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestGraphicalVisualization.java
+++ b/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestGraphicalVisualization.java
@@ -71,18 +71,20 @@ public class TestGraphicalVisualization {
private static final String TEST_PROJECT_NAME_C = "TestProject_C";
private static final String TEST_C_CLASS = "CClass.c";
- private static final String EXPECTED_TEXT_FOR_DIRECT_CONNECTIONS = "@startuml\n"
- + "object \"A : EClass\" as o0 #pink\n" + "object \"B : EClass\" as o1\n"
- + "o0--o1: A : EClass B : EClass : RelatedTo\n" + "@enduml\n";
-
- private static final String EXPECTED_TEXT_FOR_TRANSITIVE_CONNECTIONS = "@startuml\n"
- + "object \"A : EClass\" as o0 #pink\n" + "object \"B : EClass\" as o1\n" + "object \"C : EClass\" as o2\n"
- + "o0--o1: A : EClass B : EClass : RelatedTo\n" + "o1--o2: B : EClass C : EClass : RelatedTo\n"
- + "@enduml\n";
- private static final String EXPECTED_TEXT_FOR_GOTO_LINKS = "@startuml\n"
- + "object \"TestClass [[platform:/resource/TestProject_java/src/org/eclipse/capra/test/TestClass.java#org.eclipse.capra.test.TestClass (Go to)]]\" as o0 #pink\n"
- + "object \"CClass.c [[platform:/resource/TestProject_C/CClass.c#CClass.c (Go to)]]\" as o1\n"
- + "o0--o1: TestClass CClass.c : RelatedTo\n" + "@enduml\n";
+ private static final String LINE_SEPARATOR = System.lineSeparator();
+
+ private static final String EXPECTED_TEXT_FOR_DIRECT_CONNECTIONS = "@startuml" + LINE_SEPARATOR
+ + "object \"A : EClass\" as o0 #pink" + LINE_SEPARATOR + "object \"B : EClass\" as o1" + LINE_SEPARATOR
+ + "o0--o1: A : EClass B : EClass : RelatedTo" + LINE_SEPARATOR + "@enduml" + LINE_SEPARATOR;
+
+ private static final String EXPECTED_TEXT_FOR_TRANSITIVE_CONNECTIONS = "@startuml" + LINE_SEPARATOR
+ + "object \"A : EClass\" as o0 #pink" + LINE_SEPARATOR + "object \"B : EClass\" as o1" + LINE_SEPARATOR + "object \"C : EClass\" as o2" + LINE_SEPARATOR
+ + "o0--o1: A : EClass B : EClass : RelatedTo" + LINE_SEPARATOR + "o1--o2: B : EClass C : EClass : RelatedTo" + LINE_SEPARATOR
+ + "@enduml" + LINE_SEPARATOR;
+ private static final String EXPECTED_TEXT_FOR_GOTO_LINKS = "@startuml" + LINE_SEPARATOR
+ + "object \"TestClass [[platform:/resource/TestProject_java/src/org/eclipse/capra/test/TestClass.java#org.eclipse.capra.test.TestClass (Go to)]]\" as o0 #pink" + LINE_SEPARATOR
+ + "object \"CClass.c [[platform:/resource/TestProject_C/CClass.c#CClass.c (Go to)]]\" as o1" + LINE_SEPARATOR
+ + "o0--o1: TestClass CClass.c : RelatedTo" + LINE_SEPARATOR + "@enduml" + LINE_SEPARATOR;
@Before
public void init() throws CoreException {
diff --git a/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestTraceabiltyMatrix.java b/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestTraceabiltyMatrix.java
index 903f252c..9647b42f 100644
--- a/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestTraceabiltyMatrix.java
+++ b/tests/org.eclipse.capra.testsuite/src/org/eclipse/capra/testsuite/TestTraceabiltyMatrix.java
@@ -63,16 +63,18 @@ public class TestTraceabiltyMatrix {
private static final String TEST_PROJECT_NAME = "TestProject";
- private static final String EXPECTED_TEXT_FOR_SELECTED_PACKAGES_DIRECT = "@startuml\n" + "salt\n" + "{#\n"
- + ".|modelB : EPackage\n" + "modelA : EPackage |X\n" + "}\n" + "\n" + "@enduml\n";
+ private static final String LINE_SEPARATOR = System.lineSeparator();
- private static final String EXPECTED_TEXT_FOR_SELECTED_PACKAGES_TRANSITIVE = "@startuml\n" + "salt\n" + "{#\n"
- + ".|B : EClass|BB : EClass|modelB : EPackage\n" + "A : EClass |X |. |.\n" + "AA : EClass |. |X |.\n"
- + "modelA : EPackage |. |. |X\n" + "}\n" + "\n" + "@enduml\n";
+ private static final String EXPECTED_TEXT_FOR_SELECTED_PACKAGES_DIRECT = "@startuml" + LINE_SEPARATOR + "salt" + LINE_SEPARATOR + "{#" + LINE_SEPARATOR
+ + ".|modelB : EPackage" + LINE_SEPARATOR + "modelA : EPackage |X" + LINE_SEPARATOR + "}" + LINE_SEPARATOR + LINE_SEPARATOR + "@enduml" + LINE_SEPARATOR;
- private static final String EXPECTED_TEXT_FOR_SELECTED_CLASSES = "@startuml\n" + "salt\n" + "{#\n"
- + ".|A : EClass|B : EClass|AA : EClass|BB : EClass\n" + "A : EClass |. |X |. |.\n" + "B : EClass |X |. |. |.\n"
- + "AA : EClass |. |. |. |X\n" + "BB : EClass |. |. |X |.\n" + "}\n" + "\n" + "@enduml\n";
+ private static final String EXPECTED_TEXT_FOR_SELECTED_PACKAGES_TRANSITIVE = "@startuml" + LINE_SEPARATOR + "salt" + LINE_SEPARATOR + "{#" + LINE_SEPARATOR
+ + ".|B : EClass|BB : EClass|modelB : EPackage" + LINE_SEPARATOR + "A : EClass |X |. |." + LINE_SEPARATOR + "AA : EClass |. |X |." + LINE_SEPARATOR
+ + "modelA : EPackage |. |. |X" + LINE_SEPARATOR + "}" + LINE_SEPARATOR + LINE_SEPARATOR + "@enduml" + LINE_SEPARATOR;
+
+ private static final String EXPECTED_TEXT_FOR_SELECTED_CLASSES = "@startuml" + LINE_SEPARATOR + "salt" + LINE_SEPARATOR + "{#" + LINE_SEPARATOR
+ + ".|A : EClass|B : EClass|AA : EClass|BB : EClass" + LINE_SEPARATOR + "A : EClass |. |X |. |." + LINE_SEPARATOR + "B : EClass |X |. |. |." + LINE_SEPARATOR
+ + "AA : EClass |. |. |. |X" + LINE_SEPARATOR + "BB : EClass |. |. |X |." + LINE_SEPARATOR + "}" + LINE_SEPARATOR + LINE_SEPARATOR + "@enduml" + LINE_SEPARATOR;
@Before
public void init() throws CoreException {

Back to the top