2323import org .eclipse .ui .navigator .INavigatorViewerDescriptor ;
2424import org .eclipse .ui .tests .navigator .util .TestNavigatorActivationService ;
2525import org .eclipse .ui .tests .navigator .util .TestNavigatorViewerDescriptor ;
26- import org .junit .Assert ;
27- import org .junit .Test ;
26+ import org .junit .jupiter .api .Assertions ;
27+ import org .junit .jupiter .api .BeforeEach ;
28+ import org .junit .jupiter .api .Test ;
2829
2930/**
3031 * Tests the {@link EvaluationCache} to ensure it can find various key types as
@@ -38,6 +39,7 @@ public EvaluationCacheTest() {
3839 }
3940
4041 @ Override
42+ @ BeforeEach
4143 public void setUp () throws CoreException {
4244 super .setUp ();
4345 INavigatorViewerDescriptor mockViewerDescript = new TestNavigatorViewerDescriptor ();
@@ -51,9 +53,9 @@ private void doSimpleAddGet(boolean toComputeOverrides) {
5153 Object key = new Object ();
5254 NavigatorContentDescriptor [] value = new NavigatorContentDescriptor [0 ];
5355 cache .setDescriptors (key , value , toComputeOverrides );
54- Assert .assertSame (value , cache .getDescriptors (key , toComputeOverrides ));
56+ Assertions .assertSame (value , cache .getDescriptors (key , toComputeOverrides ));
5557 // The other "half" of the cache should not have this.
56- Assert .assertNull (cache .getDescriptors (key , !toComputeOverrides ));
58+ Assertions .assertNull (cache .getDescriptors (key , !toComputeOverrides ));
5759 }
5860
5961 @ Test
@@ -76,10 +78,10 @@ private void doNotSameInstEqual(boolean toComputeOverrides) {
7678 // Equal thing but different instance should still be equal.
7779 java .util .List key2 = new ArrayList <>(key );
7880 // Should also find it under this new, equal key.
79- Assert .assertSame (value , cache .getDescriptors (key2 , toComputeOverrides ));
81+ Assertions .assertSame (value , cache .getDescriptors (key2 , toComputeOverrides ));
8082 // The other "half" of the cache should not have this for either key.
81- Assert .assertNull (cache .getDescriptors (key , !toComputeOverrides ));
82- Assert .assertNull (cache .getDescriptors (key2 , !toComputeOverrides ));
83+ Assertions .assertNull (cache .getDescriptors (key , !toComputeOverrides ));
84+ Assertions .assertNull (cache .getDescriptors (key2 , !toComputeOverrides ));
8385 }
8486
8587 @ Test
@@ -96,10 +98,10 @@ private void doTestReplace(boolean toComputeOverrides) {
9698 Object key = new Object ();
9799 NavigatorContentDescriptor [] value1 = new NavigatorContentDescriptor [0 ];
98100 cache .setDescriptors (key , value1 , toComputeOverrides );
99- Assert .assertSame (value1 , cache .getDescriptors (key , toComputeOverrides ));
101+ Assertions .assertSame (value1 , cache .getDescriptors (key , toComputeOverrides ));
100102 NavigatorContentDescriptor [] value2 = new NavigatorContentDescriptor [0 ];
101103 cache .setDescriptors (key , value2 , toComputeOverrides );
102- Assert .assertSame (value2 , cache .getDescriptors (key , toComputeOverrides ));
104+ Assertions .assertSame (value2 , cache .getDescriptors (key , toComputeOverrides ));
103105 }
104106
105107 @ Test
@@ -118,14 +120,14 @@ public void testOnVisibilityOrActivationChangeClearsCaches() {
118120 NavigatorContentDescriptor [] value1 = new NavigatorContentDescriptor [0 ];
119121 cache .setDescriptors (key , value1 , false );
120122 // Make sure they actually got inserted.
121- Assert .assertSame (value1 , cache .getDescriptors (key , false ));
123+ Assertions .assertSame (value1 , cache .getDescriptors (key , false ));
122124 NavigatorContentDescriptor [] value2 = new NavigatorContentDescriptor [0 ];
123125 cache .setDescriptors (key , value2 , true );
124- Assert .assertSame (value2 , cache .getDescriptors (key , true ));
126+ Assertions .assertSame (value2 , cache .getDescriptors (key , true ));
125127 cache .onVisibilityOrActivationChange ();
126128 // Now trying to find them should give null (non present).
127- Assert .assertNull (cache .getDescriptors (key , false ));
128- Assert .assertNull (cache .getDescriptors (key , true ));
129+ Assertions .assertNull (cache .getDescriptors (key , false ));
130+ Assertions .assertNull (cache .getDescriptors (key , true ));
129131 }
130132
131133 // TODO Some way to reliably test the clearing of entries. Possibly using
0 commit comments