summaryrefslogtreecommitdiffstats
path: root/Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java')
-rw-r--r--Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java b/Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java
new file mode 100644
index 0000000..18e4e02
--- /dev/null
+++ b/Master/Agile Software Development/TestApp/test/testapp/GraphGeneratorTest.java
@@ -0,0 +1,61 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package testapp;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import java.util.logging.*;
+
+/**
+ *
+ * @author sven
+ */
+public class GraphGeneratorTest {
+
+ public GraphGeneratorTest() {
+ }
+
+ @BeforeClass
+ public static void setUpClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() {
+ }
+
+ @After
+ public void tearDown() {
+ }
+
+ /**
+ * Test of doInBackground method, of class GraphGenerator.
+ */
+ @Test
+ public void testDoInBackground() throws Exception {
+ System.out.println("doInBackground");
+ File dotFile = new File(App.getInstance().getAppPath()+"/resource/test.dot");
+ GraphGenerator instance = new GraphGenerator(dotFile);
+ instance.execute();
+ while(!instance.isDone()) {
+ Thread.sleep(100);
+ }
+ File imgFile = instance.get();
+ assertNotNull(imgFile);
+ BufferedImage img = ImageIO.read(imgFile);
+ assertNotNull(img);
+ }
+} \ No newline at end of file