Skip to content

Commit

Permalink
refactor: converted DslPart to Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen authored and rholshausen committed Jul 28, 2023
1 parent c2b44e3 commit 367d332
Show file tree
Hide file tree
Showing 38 changed files with 2,498 additions and 2,261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class LambdaDslSpec extends Specification {
def result = LambdaDsl.newJsonBody(body).build()

then:
result.body.toString() == '{"number":1,"bigdecimal":1.1,"bigint":1,"long":1}'
result.body.toString() == '{"bigdecimal":1.1,"bigint":1,"long":1,"number":1}'
}

@Issue('#910')
Expand All @@ -228,7 +228,7 @@ class LambdaDslSpec extends Specification {
def result = LambdaDsl.newJsonBody(body).build()

then:
result.body.toString() == '{"date3":"' + date3 + '","date1":"' + date1 + '"}'
result.body.toString() == "{\"date1\":\"$date1\",\"date3\":\"$date3\"}"
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public RequestResponsePact createFragment(PactDslWithProvider builder) {
public void runTest() throws IOException {
String jsonString
= Request.Get(provider.getUrl() + PROVIDER_URI).execute().returnContent().asString();
JsonValue root = JsonParser.INSTANCE.parseString(jsonString);
JsonValue root = JsonParser.parseString(jsonString);
JsonValue.Array myArrayElement = root.asObject().get(JSON_ARRAY_MEMBER_NAME).asArray();
List<ElementOfMyArray> myArray = myArrayElement.getValues().stream()
.map(e -> new ElementOfMyArray(e.asString()))
.map(e -> new ElementOfMyArray(e.get("id").asString()))
.collect(Collectors.toList());

List<String> ids = new ArrayList<>();
Expand Down
Loading

0 comments on commit 367d332

Please sign in to comment.