|
Lines 13-28
Link Here
|
| 13 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
| 14 |
package org.eclipse.gef4.dot.tests; |
14 |
package org.eclipse.gef4.dot.tests; |
| 15 |
|
15 |
|
|
|
16 |
import static org.junit.Assert.assertNotNull; |
| 17 |
import static org.junit.Assert.assertTrue; |
| 18 |
|
| 16 |
import java.io.File; |
19 |
import java.io.File; |
| 17 |
import java.io.IOException; |
20 |
import java.io.IOException; |
| 18 |
import java.io.InputStream; |
21 |
import java.io.InputStream; |
| 19 |
import java.util.Properties; |
22 |
import java.util.Properties; |
| 20 |
|
23 |
|
|
|
24 |
import org.eclipse.gef4.dot.internal.DotExecutableUtils; |
| 21 |
import org.eclipse.gef4.dot.internal.DotExport; |
25 |
import org.eclipse.gef4.dot.internal.DotExport; |
| 22 |
import org.eclipse.gef4.dot.internal.DotFileUtils; |
26 |
import org.eclipse.gef4.dot.internal.DotFileUtils; |
| 23 |
import org.eclipse.gef4.dot.internal.DotExecutableUtils; |
|
|
| 24 |
import org.eclipse.gef4.dot.internal.ui.GraphvizPreferencePage; |
| 25 |
import org.eclipse.gef4.graph.Graph; |
| 26 |
import org.junit.Assert; |
27 |
import org.junit.Assert; |
| 27 |
import org.junit.BeforeClass; |
28 |
import org.junit.BeforeClass; |
| 28 |
import org.junit.Test; |
29 |
import org.junit.Test; |
|
Lines 54-60
Link Here
|
| 54 |
if (stream == null) { |
55 |
if (stream == null) { |
| 55 |
System.err.println( |
56 |
System.err.println( |
| 56 |
"Could not load the test.properties file in directory of " //$NON-NLS-1$ |
57 |
"Could not load the test.properties file in directory of " //$NON-NLS-1$ |
| 57 |
+ DotExecutableUtilsTests.class.getSimpleName()); |
58 |
+ DotExecutableUtilsTests.class |
|
|
59 |
.getSimpleName()); |
| 58 |
} else |
60 |
} else |
| 59 |
try { |
61 |
try { |
| 60 |
props.load(stream); |
62 |
props.load(stream); |
|
Lines 80-86
Link Here
|
| 80 |
|
82 |
|
| 81 |
@Test |
83 |
@Test |
| 82 |
public void simpleGraph() { |
84 |
public void simpleGraph() { |
| 83 |
testDotGeneration(DotTestUtils.getSimpleGraph(), "simple_graph.dot"); |
85 |
testDotGeneration(DotTestUtils.getSimpleGraph(), |
|
|
86 |
"arrowshapes_direction_both.dot"); |
| 84 |
} |
87 |
} |
| 85 |
|
88 |
|
| 86 |
@Test |
89 |
@Test |
|
Lines 114-117
Link Here
|
| 114 |
} |
117 |
} |
| 115 |
} |
118 |
} |
| 116 |
|
119 |
|
|
|
120 |
@Test(timeout = 2000) |
| 121 |
public void testComplexDot() throws Exception { |
| 122 |
File dotFile = new File("./resources/arrowshapes_direction_both.dot"); |
| 123 |
assertTrue(dotFile.exists()); |
| 124 |
String[] dotResult = DotExecutableUtils |
| 125 |
.executeDot(new File(dotExecutablePath), dotFile, null, null); |
| 126 |
assertNotNull("Result should not be null", dotResult); |
| 127 |
} |
| 128 |
|
| 117 |
} |
129 |
} |