private void appendDetailedRepresentation(StringBuffer buf) { buf.append("Expected ").append(getDescription()) .append(" '").append(controlNodeDetail.getValue()) .append("' but was '").append(testNodeDetail.getValue()) .append("' - comparing "); NodeDescriptor.appendNodeDetail(buf, controlNodeDetail); buf.append(" to "); NodeDescriptor.appendNodeDetail(buf, testNodeDetail); }
private void appendDetailedRepresentation(StringBuffer buf) { buf.append("Expected ").append(getDescription()) .append(" '").append(controlNodeDetail.getValue()) .append("' but was '").append(testNodeDetail.getValue()) .append("' - comparing "); NodeDescriptor.appendNodeDetail(buf, controlNodeDetail); buf.append(" to "); NodeDescriptor.appendNodeDetail(buf, testNodeDetail); }
protected boolean ignoreDifference(final Difference d) { if ("text value".equals(d.getDescription())) { final String controlValue = d.getControlNodeDetail().getValue(); final String testValue = d.getTestNodeDetail().getValue(); return (controlValue == null || controlValue.trim().isEmpty()) && (testValue == null || testValue.trim().isEmpty()); } return false; }
/** * Copy constructor using prototype Difference and * encountered NodeDetails */ protected Difference(Difference prototype, NodeDetail controlNodeDetail, NodeDetail testNodeDetail) { this(prototype.getId(), prototype.getDescription(), prototype.isRecoverable()); this.controlNodeDetail = controlNodeDetail; this.testNodeDetail = testNodeDetail; }
/** * Copy constructor using prototype Difference and * encountered NodeDetails */ protected Difference(Difference prototype, NodeDetail controlNodeDetail, NodeDetail testNodeDetail) { this(prototype.getId(), prototype.getDescription(), prototype.isRecoverable()); this.controlNodeDetail = controlNodeDetail; this.testNodeDetail = testNodeDetail; }
if (d.getDescription().equals("namespace URI")) { if (control != null && !"null".equals(control)) { if (ignoreNamespace.test(control.toLowerCase())) { LOG.trace("Ignoring {}: {}", d.getDescription(), d); continue DIFFERENCES; LOG.trace("Ignoring {}: {}", d.getDescription(), d); continue DIFFERENCES; } else if (d.getDescription().equals("namespace prefix")) { if (control != null && !"null".equals(control)) { if (ignorePrefix.test(control.toLowerCase())) { LOG.trace("Ignoring {}: {}", d.getDescription(), d); continue DIFFERENCES; LOG.trace("Ignoring {}: {}", d.getDescription(), d); continue DIFFERENCES; } else if (d.getDescription().equals("xsi:schemaLocation attribute")) { LOG.debug("Schema location '{}' does not match. Ignoring.", controlNodeDetail.getValue() == null ? testNodeDetail.getValue() : controlNodeDetail.getValue()); continue DIFFERENCES; LOG.debug("ignoreDifference matched. Ignoring difference: {}: {}", d.getDescription(), d); continue DIFFERENCES; } else { LOG.warn("Found difference: {}: {}", d.getDescription(), d); retDifferences.add(d);