mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
bug6127: first step migrating tests from JUnit4 to JUnit5
This commit is contained in:
+3
-3
@@ -31,8 +31,8 @@ import org.apache.shiro.subject.SimplePrincipalCollection;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.util.ThreadContext;
|
||||
import org.apache.shiro.web.subject.support.WebDelegatingSubject;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.datamining.test.util.ConcurrencyTestsUtil;
|
||||
@@ -104,7 +104,7 @@ public class TestLeaderboardGroupRetrievalProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void initializeComponents() {
|
||||
final DummyRealm realm = new DummyRealm();
|
||||
SecurityUtils.setSecurityManager(new DefaultSecurityManager(realm));
|
||||
|
||||
+6
-6
@@ -1,16 +1,16 @@
|
||||
package com.sap.sailing.datamining.impl.components;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardContext;
|
||||
import com.sap.sailing.datamining.data.HasRaceOfCompetitorContext;
|
||||
@@ -54,7 +54,7 @@ public class TestSegmentsTackType extends StoredTrackBasedTest {
|
||||
private HasRaceOfCompetitorContext raceOfCompContext;
|
||||
private TackTypeSegmentRetrievalProcessor resultTTSegmentsRetrieval;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
competitorA = createCompetitorWithBoat("A");
|
||||
trackedRace = createTestTrackedRace("TestRegatta", "TestRace", "F18", createCompetitorAndBoatsMap(competitorA),
|
||||
|
||||
+3
-3
@@ -8,8 +8,8 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.sap.sailing.datamining.Activator;
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
@@ -30,7 +30,7 @@ public class TestSailingFunctionsRegistration {
|
||||
|
||||
private OpenFunctionManager functionRegistry;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUpFunctionRegistryAndProvider() {
|
||||
functionRegistry = new OpenFunctionManager();
|
||||
functionRegistry.registerAllClasses(Activator.getDefault().getClassesWithMarkedMethods());
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.sap.sailing.datamining.test.util;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package com.sap.sailing.datamining.test.util;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import net.bytebuddy.agent.VirtualMachine;
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.bytebuddy.agent.VirtualMachine;
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
@Ignore("This class is used only to demonstrate how injecting the JMX Prometheus Java agent works for a running VM")
|
||||
@Disabled("This class is used only to demonstrate how injecting the JMX Prometheus Java agent works for a running VM")
|
||||
public class TestAttachToVM {
|
||||
@Test
|
||||
public void testInjectAgentToRunningVM() throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user