Tea Estate in Assam

MounteBank- Concept of Predicates

Description of Operators apart from deepEquals & equalscontains - The request field contains the predicatestartsWithThe request field starts with the predicateendsWith - The request field ends with the predicatematches - The request field matches the JavaScript regular expression defined with the predicate.exists - If true, the request field must exist. If false, the request field must not exist.not - Inverts a predicateor - Logically or's two predicates togetherand - Logically and's two predicates together
mb --configfile jsonpath.json 

# Should send 200 status code (last element does not have career = Teacher)
curl -i -X PUT http://localhost:3000/identities --data '{
"identities": [
{
"name": "Frank Adams",
"career": "Teacher",
"location": "Utah"
},
{
"name": "Frank Williams",
"career": "Doctor",
"location": "Georgia"
}
]
}'

# Should send 400 status code (last element has career = Teacher)
curl -i -X PUT http://localhost:3000/identities --data '{
"identities": [
{
"name": "Frank Williams",
"career": "Doctor",
"location": "Georgia"
},
{
"name": "Frank Adams",
"career": "Teacher",
"location": "Utah"
}
]
}'

mb stop
mb --configfile xpath.json 

# Should send 200 status code (no element has career = Teacher and location = Utah)
curl -i -X PUT http://localhost:3000/identities --data '
<identities>
<identity career="Doctor">
<name>Frank Williams</name>
<location>Georgia</location>
</identity>
</identities>'

# Should send 400 status code (element has career = Teacher and location = Utah)
curl -i -X PUT http://localhost:3000/identities --data '
<identities>
<identity career="Doctor">
<name>Frank Williams</name>
<location>Georgia</location>
</identity>
<identity career="Teacher">
<name>Frank Adams</name>
<location>Utah</location>
</identity>
</identities>'

mb stop

--

--

--

Test Automation Enthusiastic.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DIFFERENCE BETWEEN VAR, LET & CONST IN JAVASCRIPT

How to use padStart & padEnd — ES7

How to build a serverless report server with Azure Functions and SendGrid

Rate this app, Share this app and Support me sections with Flutter

Creating a RESTfull API with Node.js

HTTP: Several Ways to Do Cache

AI Face Movement Recognition System — A quick guide

The Array Iterators Cheatsheet for JavaScript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Timus

Timus

Test Automation Enthusiastic.

More from Medium

Architecture and The Computer

Goodhart’s Law for software development

Photo edition showing world changed through a lens

Push CDN vs Pull CDN