Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

refactor: use JsonUnit instead of JSONAssert #7721

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

zregvart
Copy link
Member

JsonUnit provides nicer integration with AssertJ, doesn't have the
dependency issue[1] JSONAssert has, is maintained (JSONAssert doesn't
seem to be) and generates much nicer failure messages:

Different value found in node "spreadsheetId", expected: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24x"> but was: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24">.

or

Different keys found in node "", extra: "ID","SerialNumbers","Specification", expected: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","Name":"NEC Screen"}> but was: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","ID":4,"Name":"NEC Screen","SerialNumbers":[],"Specification":""}>

[1] skyscreamer/JSONassert#99

JsonUnit provides nicer integration with AssertJ, doesn't have the
dependency issue[1] JSONAssert has, is maintained (JSONAssert doesn't
seem to be) and generates much nicer failure messages:

```
Different value found in node "spreadsheetId", expected: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24x"> but was: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24">.
```
or
```
Different keys found in node "", extra: "ID","SerialNumbers","Specification", expected: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","Name":"NEC Screen"}> but was: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","ID":4,"Name":"NEC Screen","SerialNumbers":[],"Specification":""}>

```

[1] skyscreamer/JSONassert#99
@zregvart zregvart merged commit 39b0767 into syndesisio:master Jan 29, 2020
@zregvart zregvart deleted the pr/switch-to-json-unit branch January 29, 2020 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants