- Timestamp:
- 07/04/13 20:29:50 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/test/java/com/framsticks/gui/BrowserBaseTest.java
r90 r96 9 9 import org.fest.swing.fixture.FrameFixture; 10 10 import org.fest.swing.fixture.JTreeFixture; 11 import org.testng.annotations.AfterClass;12 import org.testng.annotations.BeforeClass;13 11 import org.testng.annotations.Test; 14 12 15 import com.framsticks.test. TestConfiguration;16 import com.framsticks.util.dispatching. Monitor;13 import com.framsticks.test.MonitorBasedTest; 14 import com.framsticks.util.dispatching.Joinable; 17 15 18 16 import static org.fest.assertions.Assertions.assertThat; … … 22 20 23 21 @Test 24 public abstract class BrowserBaseTest extends TestConfiguration{22 public abstract class BrowserBaseTest extends MonitorBasedTest { 25 23 26 24 private static final Logger log = Logger.getLogger(BrowserTest.class); 27 25 28 protected Monitor monitor;29 26 protected Browser browser; 30 27 protected static Robot robot; … … 39 36 } 40 37 41 @BeforeClass(timeOut = 5000) 42 public void setUp() { 38 @Override 39 protected Joinable createSubject() { 40 configureBrowser(); 41 return browser; 42 } 43 43 44 configureBrowser(); 45 46 monitor = new Monitor(browser); 47 48 monitor.use(); 49 44 protected void setUpAfterUse() { 50 45 frame = new FrameFixture(robot, 51 46 GuiActionRunner.execute(new GuiQuery<JFrame>() { … … 57 52 58 53 tree = frame.tree("tree"); 54 59 55 log.debug("frame fixture done"); 60 56 } 57 61 58 62 59 protected abstract void configureBrowser(); … … 71 68 } 72 69 73 @AfterClass(timeOut = 5000)74 public void tearDown() {75 monitor.drop().join();76 }77 78 70 }
Note: See TracChangeset
for help on using the changeset viewer.