1515
1616import static org .eclipse .ui .tests .harness .util .UITestUtil .processEvents ;
1717import static org .eclipse .ui .tests .harness .util .UITestUtil .processEventsUntil ;
18+ import static org .junit .Assert .assertTrue ;
1819
1920import java .io .IOException ;
2021import java .nio .file .Files ;
3536import org .eclipse .ui .internal .NavigationHistoryAction ;
3637import org .eclipse .ui .intro .IIntroPart ;
3738import org .eclipse .ui .part .FileEditorInput ;
39+ import org .eclipse .ui .tests .harness .util .CloseTestWindowsRule ;
3840import org .eclipse .ui .tests .harness .util .EditorTestHelper ;
3941import org .eclipse .ui .tests .harness .util .FileUtil ;
40- import org .eclipse .ui .tests .harness .util .UITestCase ;
4142import org .eclipse .ui .tests .harness .util .UITestUtil .Condition ;
4243import org .eclipse .ui .texteditor .AbstractTextEditor ;
4344import org .eclipse .ui .texteditor .TextSelectionNavigationLocation ;
4445import org .junit .Assert ;
46+ import org .junit .Before ;
47+ import org .junit .Rule ;
4548import org .junit .Test ;
4649
4750/**
4851 * @since 3.3
4952 *
5053 */
51- public class GoBackForwardsTest extends UITestCase {
52-
53- private static final String TEST_NAME = "GoBackForwardsTest" ;
54-
55- public GoBackForwardsTest () {
56- super (TEST_NAME );
57- }
54+ public class GoBackForwardsTest {
5855
5956 private static final String PROJECT_NAME = "GoBackForwardsTestProject" ;
6057 private static final String FILE_NAME = "GoBackForwardsTestFile.java" ;
@@ -68,8 +65,11 @@ public GoBackForwardsTest() {
6865 private IProject project ;
6966 private IFile file ;
7067
71- @ Override
72- public void doSetUp () throws CoreException , IOException {
68+ @ Rule
69+ public final CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule ();
70+
71+ @ Before
72+ public void setUp () throws CoreException , IOException {
7373 project = FileUtil .createProject (PROJECT_NAME );
7474 file = FileUtil .createFile (FILE_NAME , project );
7575 StringBuilder stringBuilder = new StringBuilder ();
0 commit comments