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
Json matcher: not /#(i) / ("a" -> "b") does not work #279
Comments
Sorry I didn't notice the notification earlier. I'm going to have a look at that this week-end. In the meantime you can create a (array must /#(0) / ("a" -> "b")).not I'll think about your "1 element check" and come back to you. |
This is a first attempt at adding ways to check sizes. What do you think? |
Your proposal fits my need. Thanks ! Some additional thoughts: |
And added a way to use matchers to check the last selected Json value
Sorry it took me a lot more time to fix than I thought, I had to do a rewrite... That made me realize that the whole For the size example, it's done here, and you can use any |
The following test pass successfully but should fail:
Looking at the code, I see that the JsonSelector object is loss when you apply "not", because a new JsonPairMatcher object is created, loosing the overriding of the navigate method.
Moreover my initial need was to check that an array only contains one element. I didn't found any way to do it. Any suggestion ? I wanted something like
array must not /#(1) / (".*".r -> ".*".r)
The text was updated successfully, but these errors were encountered: