Skip to content

Commit

Permalink
Replace JUnit Hamcrest by the standard Hamcrest dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
leomillon committed Jan 21, 2019
1 parent 87e0a92 commit 1dd6c39
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ A JCV module that supports [Hamcrest](https://github.com/hamcrest/JavaHamcrest).

```java
import static com.ekino.oss.jcv.assertion.hamcrest.JsonMatchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.MatcherAssert.*;

@Test
void testContainsValidator() throws JSONException {
Expand All @@ -188,8 +188,8 @@ Maven
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-junit</artifactId>
<version>2.0.0.0</version>
<artifactId>hamcrest</artifactId>
<version>2.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -207,7 +207,7 @@ Gradle
dependencies {
...
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0'
testImplementation 'org.hamcrest:hamcrest:2.1'
testImplementation 'com.ekino.oss.jcv:jcv-hamcrest:1.1.0-SNAPSHOT'
...
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ allprojects {
"commons-io.version" to "2.6",
"jsonassert.version" to "1.5.0",
"assertj.version" to "3.9.1",
"hamcrest-junit.version" to "2.0.0.0",
"hamcrest.version" to "2.1",
"junit-jupiter.version" to "5.2.0",
"assertk-jvm.version" to "0.12"
)
Expand Down
4 changes: 2 additions & 2 deletions jcv-hamcrest/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ dependencies {

api(project(":jcv-core"))
implementation(group = "org.skyscreamer", name = "jsonassert", version = "${prop("jsonassert.version")}")
implementation(group = "org.hamcrest", name = "hamcrest-junit", version = "${prop("hamcrest-junit.version")}")
implementation(group = "org.hamcrest", name = "hamcrest", version = "${prop("hamcrest.version")}")

testImplementation(kotlin("stdlib-jdk8", version = "${prop("kotlin.version")}"))
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter-api", version = "${prop("junit-jupiter.version")}")
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter-params", version = "${prop("junit-jupiter.version")}")
testRuntimeOnly(group = "org.junit.jupiter", name = "junit-jupiter-engine", version = "${prop("junit-jupiter.version")}")

testImplementation(group = "org.skyscreamer", name = "jsonassert", version = "${prop("jsonassert.version")}")
testImplementation(group = "org.hamcrest", name = "hamcrest-junit", version = "${prop("hamcrest-junit.version")}")
testImplementation(group = "org.hamcrest", name = "hamcrest", version = "${prop("hamcrest.version")}")
testImplementation(group = "commons-io", name = "commons-io", version = "${prop("commons-io.version")}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
*/
package com.ekino.oss.jcv.assertion.hamcrest;

import java.io.IOException;
import java.nio.charset.StandardCharsets;

import com.ekino.oss.jcv.core.validator.Validators;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.ValueMatcherException;

import java.io.IOException;
import java.nio.charset.StandardCharsets;

import static com.ekino.oss.jcv.assertion.hamcrest.JsonMatchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.MatcherAssert.*;
import static org.junit.jupiter.api.Assertions.*;

class JsonCompareMatcherTest {

Expand Down

0 comments on commit 1dd6c39

Please sign in to comment.