Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
fac6b8da
Commit
fac6b8da
authored
Jan 05, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to JSONassert 1.4.0
Closes gh-7846
parent
45d5b60f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
JsonContentAssert.java
...org/springframework/boot/test/json/JsonContentAssert.java
+22
-6
No files found.
spring-boot-dependencies/pom.xml
View file @
fac6b8da
...
...
@@ -121,7 +121,7 @@
<jolokia.version>
1.3.5
</jolokia.version>
<jooq.version>
3.9.0
</jooq.version>
<json.version>
20140107
</json.version>
<jsonassert.version>
1.
3
.0
</jsonassert.version>
<jsonassert.version>
1.
4
.0
</jsonassert.version>
<json-path.version>
2.2.0
</json-path.version>
<jstl.version>
1.2
</jstl.version>
<jtds.version>
1.3.1
</jtds.version>
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonContentAssert.java
View file @
fac6b8da
...
...
@@ -987,9 +987,17 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
if
(
this
.
actual
==
null
)
{
return
compareForNull
(
expectedJson
);
}
return
JSONCompare
.
compareJSON
(
(
expectedJson
==
null
?
null
:
expectedJson
.
toString
()),
this
.
actual
.
toString
(),
compareMode
);
try
{
return
JSONCompare
.
compareJSON
(
(
expectedJson
==
null
?
null
:
expectedJson
.
toString
()),
this
.
actual
.
toString
(),
compareMode
);
}
catch
(
Exception
ex
)
{
if
(
ex
instanceof
RuntimeException
)
{
throw
(
RuntimeException
)
ex
;
}
throw
new
IllegalStateException
(
ex
);
}
}
private
JSONCompareResult
compare
(
CharSequence
expectedJson
,
...
...
@@ -997,9 +1005,17 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
if
(
this
.
actual
==
null
)
{
return
compareForNull
(
expectedJson
);
}
return
JSONCompare
.
compareJSON
(
(
expectedJson
==
null
?
null
:
expectedJson
.
toString
()),
this
.
actual
.
toString
(),
comparator
);
try
{
return
JSONCompare
.
compareJSON
(
(
expectedJson
==
null
?
null
:
expectedJson
.
toString
()),
this
.
actual
.
toString
(),
comparator
);
}
catch
(
Exception
ex
)
{
if
(
ex
instanceof
RuntimeException
)
{
throw
(
RuntimeException
)
ex
;
}
throw
new
IllegalStateException
(
ex
);
}
}
private
JSONCompareResult
compareForNull
(
CharSequence
expectedJson
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment