Merge pull request #12150 from anuragkumawat/JAVA-11777

JAVA-11777 Remove usage of deprecated JUnitPlatform.class in junit5-migration module
This commit is contained in:
kwoyke 2022-05-06 13:44:58 +02:00 committed by GitHub
commit 072e09eee8
5 changed files with 7 additions and 15 deletions

View File

@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit-platform.version}</version>
<scope>test</scope>
</dependency>

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {