@ RobotKeyword public boolean jsonElementShouldMatch ( String source , String jsonPath , Object value , String method , String data , String contentType ) throws Exception { boolean match = false ; if ( value == null ) { throw new IllegalArgumentException ( "Given value was null" ) ; } String found = String . valueOf ( findJsonElement ( source , jsonPath , method , data , contentType ) ) ; if ( found . equals ( value ) ) { System . out . println ( "*DEBUG* The values '" + found + "' and '" + value + "' did match" ) ; match = true ; } else { System . out . println ( "*ERROR* The values '" + found + "' and '" + value + "' did not match" ) ; throw new JsonNotEqualException ( "The found value did not match, found '" + found + "', expected '" + value + "'" ) ; } return match ; }
Checks if the given value matches the one found by the jsonPath from the source .