/* * 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); } }