1313 *******************************************************************************/
1414package org .eclipse .ui .tests .internal ;
1515
16- import static org .junit .Assert .assertEquals ;
17- import static org .junit .Assert .assertFalse ;
16+ import static org .junit .jupiter . api . Assertions .assertEquals ;
17+ import static org .junit .jupiter . api . Assertions .assertFalse ;
1818
1919import java .util .ArrayList ;
2020import java .util .List ;
2323import org .eclipse .ui .ide .IDE ;
2424import org .eclipse .ui .internal .registry .EditorDescriptor ;
2525import org .eclipse .ui .internal .registry .FileEditorMapping ;
26- import org .eclipse .ui .tests .harness .util .CloseTestWindowsRule ;
27- import org .junit .Before ;
28- import org .junit .Ignore ;
29- import org .junit .Rule ;
30- import org .junit .Test ;
31-
32- @ Ignore
26+ import org .eclipse .ui .tests .harness .util .CloseTestWindowsExtension ;
27+ import org .junit .jupiter .api .BeforeEach ;
28+ import org .junit .jupiter .api .Disabled ;
29+ import org .junit .jupiter .api .Test ;
30+ import org .junit .jupiter .api .extension .ExtendWith ;
31+
32+ @ Disabled
33+ @ ExtendWith (CloseTestWindowsExtension .class )
3334public class FileEditorMappingTest {
3435
35- @ Rule
36- public final CloseTestWindowsRule closeTestWindowsRule = new CloseTestWindowsRule ();
37-
3836 private EditorDescriptor textEditor ;
3937 private EditorDescriptor pdeEditor ;
4038
41- @ Before
39+ @ BeforeEach
4240 public final void setUp () throws Exception {
4341 textEditor = (EditorDescriptor ) IDE .getEditorDescriptor ("test.txt" );
4442 pdeEditor = (EditorDescriptor ) IDE .getEditorDescriptor ("plugin.xml" );
@@ -53,8 +51,7 @@ public void testEquals() {
5351 assertEquals (textEditor , mappingA .getEditors ()[0 ]);
5452
5553 FileEditorMapping mappingB = new FileEditorMapping ("txt" );
56- assertFalse ("No editor set for B, should not be equal" , mappingA
57- .equals (mappingB ));
54+ assertFalse (mappingA .equals (mappingB ), "No editor set for B, should not be equal" );
5855
5956 mappingA .addEditor (pdeEditor );
6057 mappingB .addEditor (textEditor );
@@ -70,8 +67,7 @@ public void testEquals() {
7067
7168 assertEquals (textEditor , mappingA .getDefaultEditor ());
7269 assertEquals (pdeEditor , mappingB .getDefaultEditor ());
73- assertFalse ("Identical except the default editor, should not be equal" ,
74- mappingA .equals (mappingB ));
70+ assertFalse (mappingA .equals (mappingB ), "Identical except the default editor, should not be equal" );
7571 }
7672
7773 @ Test
@@ -97,8 +93,7 @@ public void testEquals2() {
9793 mappingA .setDefaultEditors (defaultA );
9894 mappingB .setDefaultEditors (defaultB );
9995
100- assertFalse ("Identical except the default editor, should not be equal" ,
101- mappingA .equals (mappingB ));
96+ assertFalse (mappingA .equals (mappingB ), "Identical except the default editor, should not be equal" );
10297 }
10398
10499 @ Test
@@ -110,8 +105,7 @@ public void testHashCode() {
110105 assertEquals (textEditor , mappingA .getEditors ()[0 ]);
111106
112107 FileEditorMapping mappingB = new FileEditorMapping ("txt" );
113- assertFalse ("No editor set for B, should not be equal" , mappingA
114- .hashCode () == mappingB .hashCode ());
108+ assertFalse (mappingA .hashCode () == mappingB .hashCode (), "No editor set for B, should not be equal" );
115109
116110 mappingA .addEditor (pdeEditor );
117111 mappingB .addEditor (textEditor );
@@ -127,8 +121,7 @@ public void testHashCode() {
127121
128122 assertEquals (textEditor , mappingA .getDefaultEditor ());
129123 assertEquals (pdeEditor , mappingB .getDefaultEditor ());
130- assertFalse ("Identical except the default editor, should not be equal" ,
131- mappingA .hashCode () == mappingB .hashCode ());
124+ assertFalse (mappingA .hashCode () == mappingB .hashCode (), "Identical except the default editor, should not be equal" );
132125 }
133126
134127 @ Test
@@ -154,8 +147,7 @@ public void testHashCode2() {
154147 mappingA .setDefaultEditors (defaultA );
155148 mappingB .setDefaultEditors (defaultB );
156149
157- assertFalse ("Identical except the default editor, should not be equal" ,
158- mappingA .hashCode () == mappingB .hashCode ());
150+ assertFalse (mappingA .hashCode () == mappingB .hashCode (), "Identical except the default editor, should not be equal" );
159151 }
160152
161153 @ Test
0 commit comments