@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object other) { if (!(other instanceof DataSource)) { return false; } return data.equals(((DataSource) other).getObjectNode()); }
private static void apply(Object objectToSerialize, String str, ObjectMapper mapper) { final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class); ObjectNode rhs = null; try { rhs = mapper.readValue(str, ObjectNode.class); } catch (IOException e) { LOGGER.error("Failed to read value", e); } if (!lhs.equals(new ObjectNodeComparator(), rhs)) { assertEquals(Yaml.pretty(lhs), Yaml.pretty(rhs)); //fail(String.format("Serialized object:\n%s\ndoes not equal to expected serialized string:\n%s", lhs, rhs)); } }
@Override public boolean equals(Object o) { if (!(o instanceof Row)) { return false; } return _data.equals(((Row) o)._data); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof JsonSchema)) return false; JsonSchema other = (JsonSchema) o; if (schema == null) { return other.schema == null; } return schema.equals(other.schema); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonEvent jsonEvent = (JsonEvent) o; return jsonNode != null ? jsonNode.equals(jsonEvent.jsonNode) : jsonEvent.jsonNode == null; }
!extensionObjectNode.equals(that.extensionObjectNode) : that.extensionObjectNode != null)
!extensionObjectNode.equals(that.extensionObjectNode) : that.extensionObjectNode != null)
callbackParameters.equals(that.callbackParameters) : that.callbackParameters == null;
/** Returns a function that checks that a particular Elasticsearch pipeline is * generated to implement a query. * @param strings expected expressions * @return validation function */ public static Consumer<List> elasticsearchChecker(final String... strings) { Objects.requireNonNull(strings, "strings"); return a -> { ObjectNode actual = a == null || a.isEmpty() ? null : ((ObjectNode) a.get(0)); actual = expandDots(actual); try { String json = "{" + Arrays.stream(strings).collect(Collectors.joining(",")) + "}"; ObjectNode expected = (ObjectNode) MAPPER.readTree(json); expected = expandDots(expected); if (!expected.equals(actual)) { assertEquals("expected and actual Elasticsearch queries do not match", MAPPER.writeValueAsString(expected), MAPPER.writeValueAsString(actual)); } } catch (IOException e) { throw new UncheckedIOException(e); } }; }
expectedNode.equals(readNode));
expectedNode.equals(readNode));
JsonNode readNode = mapper.readTree(docText); assertTrue("Failed to read JSON document as String", sourceNode.equals(readNode)); readNode = mapper.readTree(bytesHandle.get()); assertTrue("JSON document mismatch reading bytes", sourceNode.equals(readNode)); readNode = mapper.readTree(inputStreamHandle.get()); assertTrue("JSON document mismatch reading input stream", sourceNode.equals(readNode)); sourceNode.equals(readNode)); sourceNode.equals(readNode));