Browse Source

Upgrade tests to TestNG 7.1

See gh-24298
pull/25047/head
Sam Brannen 5 years ago
parent
commit
745cfcb161
  1. 5
      spring-test/src/test/java/org/springframework/test/context/cache/ClassLevelDirtiesContextTestNGTests.java
  2. 5
      spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java

5
spring-test/src/test/java/org/springframework/test/context/cache/ClassLevelDirtiesContextTestNGTests.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testng.ITestNGListener;
import org.testng.TestNG;
import org.springframework.beans.factory.annotation.Autowired;
@ -140,7 +139,7 @@ class ClassLevelDirtiesContextTestNGTests { @@ -140,7 +139,7 @@ class ClassLevelDirtiesContextTestNGTests {
final TrackingTestNGTestListener listener = new TrackingTestNGTestListener();
final TestNG testNG = new TestNG();
testNG.addListener((ITestNGListener) listener);
testNG.addListener(listener);
testNG.setTestClasses(new Class<?>[] { testClass });
testNG.setVerbose(0);
testNG.run();

5
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import org.junit.Test; @@ -21,7 +21,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.testng.ITestNGListener;
import org.testng.TestNG;
import org.springframework.test.context.ContextConfiguration;
@ -97,7 +96,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @@ -97,7 +96,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests {
public void runTestAndAssertCounters() throws Exception {
TrackingTestNGTestListener listener = new TrackingTestNGTestListener();
TestNG testNG = new TestNG();
testNG.addListener((ITestNGListener) listener);
testNG.addListener(listener);
testNG.setTestClasses(new Class<?>[] {this.clazz});
testNG.setVerbose(0);
testNG.run();

Loading…
Cancel
Save