Class CustomComparator

    • Method Detail

      • compareValues

        public void compareValues​(String prefix,
                                  Object expectedValue,
                                  Object actualValue,
                                  JSONCompareResult result)
                           throws org.json.JSONException
        Description copied from interface: JSONComparator
        Compares two Objects on the provided path represented by prefix and updates the result of the comparison in the result JSONCompareResult object.
        Specified by:
        compareValues in interface JSONComparator
        Overrides:
        compareValues in class DefaultComparator
        Parameters:
        prefix - the path in the json where the comparison happens
        expectedValue - the expected value
        actualValue - the actual value
        result - stores the actual state of the comparison result
        Throws:
        org.json.JSONException - JSON parsing error