JAVA-11777 Remove usage of deprecated JUnitPlatform.class in junit5-migration module
This commit is contained in:
+2
-5
@@ -1,17 +1,14 @@
|
||||
package com.baeldung.junit5;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@Tag("annotations")
|
||||
@Tag("junit5")
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class AnnotationTestExampleUnitTest {
|
||||
@Test
|
||||
public void shouldRaiseAnException() throws Exception {
|
||||
|
||||
-3
@@ -2,10 +2,7 @@ package com.baeldung.junit5;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(TraceUnitExtension.class)
|
||||
public class RuleExampleUnitTest {
|
||||
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.platform.suite.api.SelectClasses;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.platform.suite.api.Suite;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@Suite
|
||||
@SelectClasses({Class1UnitTest.class, Class2UnitTest.class})
|
||||
public class SelectClassesSuiteUnitTest {
|
||||
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.platform.suite.api.SelectPackages;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.platform.suite.api.Suite;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@Suite
|
||||
@SelectPackages({ "com.baeldung.java.suite.childpackage1", "com.baeldung.java.suite.childpackage2" })
|
||||
public class SelectPackagesSuiteUnitTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user