You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/05/05 11:42:30 UTC
[tomcat] branch 7.0.x updated: Fix JUnit deprecations
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 9a2cf7f Fix JUnit deprecations
9a2cf7f is described below
commit 9a2cf7f2b52bca9e8e0d2c64da98c4de4faa72af
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue May 5 12:42:14 2020 +0100
Fix JUnit deprecations
---
test/org/apache/catalina/core/TestStandardContext.java | 3 ++-
.../catalina/tribes/group/interceptors/TestEncryptInterceptor.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/org/apache/catalina/core/TestStandardContext.java b/test/org/apache/catalina/core/TestStandardContext.java
index 4d27958..88d7e53 100644
--- a/test/org/apache/catalina/core/TestStandardContext.java
+++ b/test/org/apache/catalina/core/TestStandardContext.java
@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.hamcrest.CoreMatchers;
+import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
@@ -862,7 +863,7 @@ public class TestStandardContext extends TomcatBaseTest {
Context context = new StandardContext();
context.setResourceOnlyServlets("a,b,c");
- Assert.assertThat(Arrays.asList(context.getResourceOnlyServlets().split(",")),
+ MatcherAssert.assertThat(Arrays.asList(context.getResourceOnlyServlets().split(",")),
CoreMatchers.hasItems("a", "b", "c"));
}
diff --git a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
index 8dc7a5f..e5be576 100644
--- a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
+++ b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
@@ -25,6 +25,7 @@ import java.util.Collection;
import javax.crypto.Cipher;
+import org.hamcrest.MatcherAssert;
import org.hamcrest.core.IsEqual;
import org.hamcrest.core.IsNot;
@@ -371,7 +372,7 @@ public class TestEncryptInterceptor {
byte[] cipherText2 = ((ValueCaptureInterceptor)src.getNext()).getValue();
- Assert.assertThat("Two identical cleartexts encrypt to the same ciphertext",
+ MatcherAssert.assertThat("Two identical cleartexts encrypt to the same ciphertext",
cipherText1, IsNot.not(IsEqual.equalTo(cipherText2)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org