- Timestamp:
- 06/30/13 12:48:20 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/test/java/com/framsticks/gui/BrowserTest.java
r87 r88 3 3 import javax.swing.JFrame; 4 4 5 import org.apache.commons.configuration.PropertiesConfiguration;6 5 import org.apache.log4j.Logger; 7 6 import org.fest.swing.edt.FailOnThreadViolationRepaintManager; … … 16 15 import com.framsticks.remote.RemoteInstance; 17 16 import com.framsticks.test.TestConfiguration; 17 import com.framsticks.util.dispatching.Dispatching; 18 import com.framsticks.util.dispatching.JoinableMonitor; 19 // import com.framsticks.util.dispatching.Dispatching; 18 20 19 21 import static org.fest.assertions.Assertions.*; … … 25 27 private static final Logger log = Logger.getLogger(BrowserTest.class); 26 28 29 JoinableMonitor monitor; 27 30 Browser browser; 28 31 Robot robot; … … 37 40 38 41 browser = new Browser(); 39 browser.configure(new PropertiesConfiguration());42 monitor = new JoinableMonitor(browser); 40 43 41 44 RemoteInstance localhost = new RemoteInstance(); … … 43 46 localhost.setAddress("localhost:9009"); 44 47 45 browser.add EndpointForInstance(localhost);48 browser.addInstance(localhost); 46 49 47 browser.start();50 monitor.use(); 48 51 // robot.waitForIdle(); 49 52 frame = new FrameFixture(robot, … … 51 54 @Override 52 55 protected JFrame executeInEDT() throws Throwable { 53 return browser.getMainFrame() ;56 return browser.getMainFrame().getSwing(); 54 57 } 55 58 })); … … 86 89 clickAndExpandPath(tree, "localhost/simulator/genepools/groups"); 87 90 clickAndExpandPath(tree, "localhost/simulator/genepools/groups/Genotypes"); 91 92 93 94 95 96 88 97 // tree.clickPath("localhost/simulator/genepools/groups/Genotypes/genotypes"); 89 98 // robot.waitForIdle(); … … 97 106 } 98 107 99 public void sleep(int seconds) {100 try {101 Thread.sleep(seconds * 1000, 0);102 } catch (InterruptedException e) {103 e.printStackTrace();104 }105 }106 108 107 109 @AfterClass 108 110 public void tearDown() { 109 // frame.close(); 110 frame.cleanUp(); 111 log.info("before close"); 112 113 monitor.drop(); 114 115 Dispatching.joinAbsolutely(browser); 116 // frame.cleanUp(); 117 // log.info("before close"); 118 // browser.interrupt(); 119 120 // try { 121 // // frame.close(); 122 // } catch (Throwable t) { 123 // log.error("caught ", t); 124 // } 125 // log.info("after close"); 126 // // frame.close(); 127 // // frame.cleanUp(); 128 129 130 131 // Dispatching.join(browser); 111 132 } 112 133
Note: See TracChangeset
for help on using the changeset viewer.