Skip to content

Commit

Permalink
Drop JsonPath support, closes #171 (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfs authored Feb 10, 2024
1 parent e16fcaf commit 8ecf4c4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 136 deletions.
4 changes: 1 addition & 3 deletions confidence-json/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ dependencies {
annotationProcessor libs.bundles.srcless.processors
implementation libs.jems2
implementation libs.jems2.confidence
implementation project(':confidence-core')
api project(':confidence-core')
implementation libs.org.json
compileOnly libs.json.path
compileOnly libs.express.json

testImplementation project(':confidence-test')
testImplementation libs.jems2.testing
testImplementation libs.junit.jupiter.api
testImplementation libs.express.json
testImplementation libs.json.path
testRuntimeOnly libs.junit.jupiter.engine
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.saynotobugs.confidence.json;

import io.restassured.path.json.JsonPath;
import org.junit.jupiter.api.Test;

import static org.saynotobugs.confidence.Assertion.assertThat;
Expand Down Expand Up @@ -154,44 +153,4 @@ void testNotAnything()
not(nullValue())
))));
}


@Test
void testNotAnythingJsonPath()
{
assertThat(JsonPath.from("123"),
is(jsonPathOf(
allOf(
not(object(anything())),
not(array(anything())),
not(string(anything())),
not(bool(anything())),
number(anything()),
not(nullValue())
))));
}

@Test
void testNestedJsonpath()
{
assertThat(JsonPath.from("{\n" +
" \"key1\": {\n" +
" \"anyValue\": \"abc\",\n" +
" \"nullValue\": null\n" +
" },\n" +
" \"key2\": {\n" +
" \"numberValue\": 4\n" +
" }\n" +
"}"),
is(jsonPathOf(object(
with("key1", object(
with("anyValue"),
with("nullValue", nullValue()),
hasMemberCount(2)
)),
with("key2", object(
with("numberValue", 4)
))
))));
}
}

This file was deleted.

2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ eclipse-jdt = "2.2.600"
express = "0.3.1"
hamcrest = "2.2"
jems2 = "2.22.0"
json-path = "5.4.0"
junit = "5.8.2"
junit-testkit = "1.9.2"
mockito4 = "4.6.1"
Expand Down Expand Up @@ -37,7 +36,6 @@ express-json = { module = "org.dmfs:express-json", version.ref = "express" }
rxjava3 = { module = 'io.reactivex.rxjava3:rxjava', version.ref = "rxjava3" }

org-json = { module = "org.json:json", version.ref = "org-json" }
json-path = { module = "io.rest-assured:json-path", version.ref = "json-path" }

[bundles]
srcless-processors = ["srcless-processors", "nullless-processors"]
Expand Down

0 comments on commit 8ecf4c4

Please sign in to comment.