public int evaluate(Difference difference) { int returnValue = RETURN_ACCEPT_DIFFERENCE; if (differenceListenerDelegate != null) { returnValue = differenceListenerDelegate.differenceFound(difference); } return returnValue; }
public void skippedComparison(Node control, Node test) { delegateTo.skippedComparison(control, test); }
/** * Delegates to the nested DifferenceListener. */ protected int textualDifference(Difference d) { return delegateTo.differenceFound(d); }
public void skippedComparison(Node control, Node test) { delegateTo.skippedComparison(control, test); }
/** * Delegates to the nested DifferenceListener. */ protected int textualDifference(Difference d) { return delegateTo.differenceFound(d); }
/** * DifferenceListener implementation. * If the {@link Diff#overrideDifferenceListener overrideDifferenceListener} * method has been called then the call will be delegated * otherwise a message is printed to <code>System.err</code>. * @param control * @param test */ public void skippedComparison(Node control, Node test) { if (differenceListenerDelegate != null) { differenceListenerDelegate.skippedComparison(control, test); } else { System.err.println("DifferenceListener.skippedComparison: " + "unhandled control node type=" + control + ", unhandled test node type=" + test); } }
int returnValue = RETURN_ACCEPT_DIFFERENCE; if (differenceListenerDelegate != null) { returnValue = differenceListenerDelegate.differenceFound(difference);
/** * DifferenceListener implementation. * If the {@link Diff#overrideDifferenceListener overrideDifferenceListener} * method has been called then the call will be delegated * otherwise a message is printed to <code>System.err</code>. * @param control * @param test */ public void skippedComparison(Node control, Node test) { if (differenceListenerDelegate != null) { differenceListenerDelegate.skippedComparison(control, test); } else { System.err.println("DifferenceListener.skippedComparison: " + "unhandled control node type=" + control + ", unhandled test node type=" + test); } }
for (Difference diff : toDifference(comparison)) { ComparisonResult curr = null; switch (dl.differenceFound(diff)) { case DifferenceListener .RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL:
break; default: listener.skippedComparison(control, test);
/** * Delegates to the nested DifferenceListener unless the * Difference is of type {@link DifferenceConstants#ATTR_VALUE_ID * ATTR_VALUE_ID}, {@link DifferenceConstants#CDATA_VALUE_ID * CDATA_VALUE_ID}, {@link DifferenceConstants#COMMENT_VALUE_ID * COMMENT_VALUE_ID} or {@link DifferenceConstants#TEXT_VALUE_ID * TEXT_VALUE_ID} - for those special differences {@link * #attributeDifference attributeDifference}, {@link * #cdataDifference cdataDifference}, {@link #commentDifference * commentDifference} or {@link #textDifference textDifference} * are invoked respectively. */ public int differenceFound(Difference difference) { switch (difference.getId()) { case DifferenceConstants.ATTR_VALUE_ID: return attributeDifference(difference); case DifferenceConstants.CDATA_VALUE_ID: return cdataDifference(difference); case DifferenceConstants.COMMENT_VALUE_ID: return commentDifference(difference); case DifferenceConstants.TEXT_VALUE_ID: return textDifference(difference); } return delegateTo.differenceFound(difference); }
break; default: listener.skippedComparison(control, test);
/** * Delegates to the nested DifferenceListener unless the * Difference is of type {@link DifferenceConstants#ATTR_VALUE_ID * ATTR_VALUE_ID}, {@link DifferenceConstants#CDATA_VALUE_ID * CDATA_VALUE_ID}, {@link DifferenceConstants#COMMENT_VALUE_ID * COMMENT_VALUE_ID} or {@link DifferenceConstants#TEXT_VALUE_ID * TEXT_VALUE_ID} - for those special differences {@link * #attributeDifference attributeDifference}, {@link * #cdataDifference cdataDifference}, {@link #commentDifference * commentDifference} or {@link #textDifference textDifference} * are invoked respectively. */ public int differenceFound(Difference difference) { switch (difference.getId()) { case DifferenceConstants.ATTR_VALUE_ID: return attributeDifference(difference); case DifferenceConstants.CDATA_VALUE_ID: return cdataDifference(difference); case DifferenceConstants.COMMENT_VALUE_ID: return commentDifference(difference); case DifferenceConstants.TEXT_VALUE_ID: return textDifference(difference); } return delegateTo.differenceFound(difference); }
controlDetail, testDetail); if (unequal(expected, actual)) { listener.differenceFound(differenceInstance); if (controller.haltComparison(differenceInstance)) { throw flowControlException;
controlDetail, testDetail); if (unequal(expected, actual)) { listener.differenceFound(differenceInstance); if (controller.haltComparison(differenceInstance)) { throw flowControlException;