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:
commit
072e09eee8
|
@ -22,7 +22,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.platform</groupId>
|
<groupId>org.junit.platform</groupId>
|
||||||
<artifactId>junit-platform-runner</artifactId>
|
<artifactId>junit-platform-suite</artifactId>
|
||||||
<version>${junit-platform.version}</version>
|
<version>${junit-platform.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
package com.baeldung.junit5;
|
package com.baeldung.junit5;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Disabled;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Tag;
|
import org.junit.jupiter.api.Tag;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.platform.runner.JUnitPlatform;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.time.Duration;
|
|
||||||
|
|
||||||
@Tag("annotations")
|
@Tag("annotations")
|
||||||
@Tag("junit5")
|
@Tag("junit5")
|
||||||
@RunWith(JUnitPlatform.class)
|
|
||||||
public class AnnotationTestExampleUnitTest {
|
public class AnnotationTestExampleUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void shouldRaiseAnException() throws Exception {
|
public void shouldRaiseAnException() throws Exception {
|
||||||
|
|
|
@ -2,10 +2,7 @@ package com.baeldung.junit5;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.junit.platform.runner.JUnitPlatform;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
@RunWith(JUnitPlatform.class)
|
|
||||||
@ExtendWith(TraceUnitExtension.class)
|
@ExtendWith(TraceUnitExtension.class)
|
||||||
public class RuleExampleUnitTest {
|
public class RuleExampleUnitTest {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.baeldung.junit5vstestng;
|
package com.baeldung.junit5vstestng;
|
||||||
|
|
||||||
import org.junit.platform.runner.JUnitPlatform;
|
|
||||||
import org.junit.platform.suite.api.SelectClasses;
|
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})
|
@SelectClasses({Class1UnitTest.class, Class2UnitTest.class})
|
||||||
public class SelectClassesSuiteUnitTest {
|
public class SelectClassesSuiteUnitTest {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.baeldung.junit5vstestng;
|
package com.baeldung.junit5vstestng;
|
||||||
|
|
||||||
import org.junit.platform.runner.JUnitPlatform;
|
|
||||||
import org.junit.platform.suite.api.SelectPackages;
|
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" })
|
@SelectPackages({ "com.baeldung.java.suite.childpackage1", "com.baeldung.java.suite.childpackage2" })
|
||||||
public class SelectPackagesSuiteUnitTest {
|
public class SelectPackagesSuiteUnitTest {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue