public static WrongAnnotation wrong(Expectation expected, Object actual) { WrongAnnotation annotation = wrong(); annotation.giveDetails(expected, actual); return annotation; }
@Override public void annotate(Annotation annotation) { annotation.writeDown(this); }
public static WrongAnnotation wrong() { return new WrongAnnotation(); }
private void doRow(Example row) { LOG.trace(ENTRY_WITH, row.toString()); if ("right".equals(row.firstChild().at(0).getContent())) { row.firstChild().at(1).annotate(new RightAnnotation()); } if ("wrong".equals(row.firstChild().at(0).getContent())) { row.firstChild().at(1).annotate(new WrongAnnotation()); } if ("ignore".equals(row.firstChild().at(0).getContent())) { row.firstChild().at(1).annotate(new IgnoredAnnotation("")); } LOG.trace(EXIT); }
public static IgnoredAnnotation ignored(Object actual) { return new IgnoredAnnotation(actual); }
public static SurplusAnnotation surplus() { return new SurplusAnnotation(); }
public static RightAnnotation right() { return new RightAnnotation(); }
public static EnteredAnnotation entered() { return new EnteredAnnotation(); }
public static Annotation missing() { return new MissingAnnotation(); }
public static NotEnteredAnnotation notEntered() { return new NotEnteredAnnotation(); }
public static SkippedAnnotation skipped() { return new SkippedAnnotation(); }
public static StoppedAnnotation stopped() { return new StoppedAnnotation(); }
public static ExceptionAnnotation exception(Throwable t) { if (t instanceof InvocationTargetException) { return new ExceptionAnnotation( ( ( InvocationTargetException ) t ).getTargetException()); } return new ExceptionAnnotation(t); }
@Override public void call(Result result) { example.annotate(Annotations.entered()); } }
@Override public void call(Result result) { example.annotate(Annotations.notEntered()); } }
@Override public void writeDown(Text text) { text.setStyle(Styles.BACKGROUND_COLOR, Colors.RED); text.setContent(message()); }
@Override public void writeDown(Text text) { text.setStyle(Styles.BACKGROUND_COLOR, Colors.RED); text.setContent(message()); }
@Override public void writeDown(Text text) { text.setStyle(Styles.BACKGROUND_COLOR, Colors.ORANGE); text.setContent(message()); }
@Override public void writeDown(Text text) { text.setStyle(Styles.BACKGROUND_COLOR, Colors.RED); text.setContent(message() + text.getContent()); }
@Override public void writeDown(Text text) { text.setStyle(Styles.BACKGROUND_COLOR, Colors.RED); text.setContent(message() + text.getContent()); }