Replace jcabi-matchers with hamcrest 2

pull/81/head
Richard Körber 2018-10-13 10:43:53 +02:00
parent 9d431d2289
commit 565bb79811
No known key found for this signature in database
GPG Key ID: AAB9FD19C78AA3E0
3 changed files with 6 additions and 15 deletions

View File

@ -46,8 +46,6 @@ import org.hamcrest.Description;
import org.junit.BeforeClass;
import org.junit.Test;
import com.jcabi.matchers.RegexMatchers;
/**
* Unit tests for {@link CSRBuilder}.
*/
@ -191,7 +189,7 @@ public class CSRBuilderTest {
}
// Make sure PEM file is properly formatted
assertThat(pem, RegexMatchers.matchesPattern(
assertThat(pem, matchesPattern(
"-----BEGIN CERTIFICATE REQUEST-----[\\r\\n]+"
+ "([a-zA-Z0-9/+=]+[\\r\\n]+)+"
+ "-----END CERTIFICATE REQUEST-----[\\r\\n]*"));

View File

@ -30,8 +30,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.junit.BeforeClass;
import org.junit.Test;
import com.jcabi.matchers.RegexMatchers;
/**
* Unit tests for {@link KeyPairUtils}.
*/
@ -73,7 +71,7 @@ public class KeyPairUtilsTest {
}
// Make sure PEM file is properly formatted
assertThat(pem, RegexMatchers.matchesPattern(
assertThat(pem, matchesPattern(
"-----BEGIN RSA PRIVATE KEY-----[\\r\\n]+"
+ "([a-zA-Z0-9/+=]+[\\r\\n]+)+"
+ "-----END RSA PRIVATE KEY-----[\\r\\n]*"));
@ -116,7 +114,7 @@ public class KeyPairUtilsTest {
}
// Make sure PEM file is properly formatted
assertThat(pem, RegexMatchers.matchesPattern(
assertThat(pem, matchesPattern(
"-----BEGIN EC PRIVATE KEY-----[\\r\\n]+"
+ "([a-zA-Z0-9/+=]+[\\r\\n]+)+"
+ "-----END EC PRIVATE KEY-----[\\r\\n]*"));

11
pom.xml
View File

@ -228,16 +228,11 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>[1.3,)</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-matchers</artifactId>
<version>[1.3,)</version>
<artifactId>java-hamcrest</artifactId>
<version>[2.0.0.0,)</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.co.datumedge</groupId>
<artifactId>hamcrest-json</artifactId>