Skip to content

Commit 577ef55

Browse files
committed
Replace UITestCase with test rule in org.eclipse.ui.tests.navigator
1 parent 1346168 commit 577ef55

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/GoBackForwardsTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
1717
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEventsUntil;
18+
import static org.junit.Assert.assertTrue;
1819

1920
import java.io.IOException;
2021
import java.nio.file.Files;
@@ -35,26 +36,22 @@
3536
import org.eclipse.ui.internal.NavigationHistoryAction;
3637
import org.eclipse.ui.intro.IIntroPart;
3738
import org.eclipse.ui.part.FileEditorInput;
39+
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
3840
import org.eclipse.ui.tests.harness.util.EditorTestHelper;
3941
import org.eclipse.ui.tests.harness.util.FileUtil;
40-
import org.eclipse.ui.tests.harness.util.UITestCase;
4142
import org.eclipse.ui.tests.harness.util.UITestUtil.Condition;
4243
import org.eclipse.ui.texteditor.AbstractTextEditor;
4344
import org.eclipse.ui.texteditor.TextSelectionNavigationLocation;
4445
import org.junit.Assert;
46+
import org.junit.Before;
47+
import org.junit.Rule;
4548
import 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

Comments
 (0)