Skip to content

Releases: webcompere/model-assert

v1.1.0

Choose a tag to compare

@ashleyfrieze ashleyfrieze released this 09 Nov 13:07
a5b08de

Warning

Potential Breaking change - when using text(), object(), booleanNode(), object(), array(), in path assertions, the resulting dsl no longer has the respective isText(), isBoolean() etc type assertions.

Similarly, where previously these expressions just narrowed down the DSL to ones relevant to the node type, from now, each of these expressions add a condition that the node is of the type requested.

This release adds clarity to isEmpty() and isNotEmpty().

Previously isEmpty was looking for a node type that contains other things - array, object or text - and passing the condition if that node was of one of those types and had no contents. This is a good shorthand, but is a bit fuzzy nonetheless.

However, isNotEmpty wasn't operating in a meaningful way, especially if the node was missing. A missing node was being treated as a not empty node, which makes no sense.

Emptiness testing on a node without first checking its type is not very helpful. We've deprecated isNotEmpty for nodes of unknown type: instead use the text(), array() or object() type checker to get into a DSL for the right sort of node, and then isEmpty and isNotEmpty make more sense.

There's a risk that these changes can affect existing tests a small amount.

v1.0.3

Choose a tag to compare

@ashleyfrieze ashleyfrieze released this 11 Jul 10:46
ab0a58f

Add the ability to customise the ObjectMapper used for JSON transformation.

v1.0.2

Choose a tag to compare

@ashleyfrieze ashleyfrieze released this 31 Dec 12:49
a2ba305

Fix a minor bug when a rule relates to a node that doesn't exist in the actual. This caused a NullPointerException.

v1.0.1

Choose a tag to compare

@ashleyfrieze ashleyfrieze released this 31 Dec 12:48
90f5444

Update Jackson to reduce vulnerabilities

v1.0.0

Choose a tag to compare

@ashleyfrieze ashleyfrieze released this 31 Dec 12:46

Initial release of the whole library