-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMBuilder v3.2.0 - support explicit null checks for nodes #39
Conversation
…s setter method return type (force adoption of builder pattern consistent with design of JPCheck classes).
…s regarding null checking ability.
@@ -190,7 +203,9 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont | |||
return; | |||
} | |||
|
|||
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist.")); | |||
if (!isNullExpected()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For collection types, is it worth adding another check empty as well for size ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty and size can both be evaluated by using the expected size check that already exists: https://github.com/eBay/NSTSuite/blob/main/NST/src/main/java/com/ebay/jsonpath/JPListOfIntegerCheck.java#L19 For the empty case size should be set to 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 suggestion to rename a var
Request was made to define checks that verify nodes are null. v3.2.0 adds this support. Includes changes to JPChecks*, TMJPCheck* wrappers and all related unit tests.