public ExecutionFailure assertThatCause(final Matcher<String> matcher) { List<Throwable> causes = new ArrayList<Throwable>(); extractCauses(failure, causes); assertThat(causes, Matchers.<Throwable>hasItem(hasMessage(matcher))); outputFailure.assertThatCause(matcher); return this; }
public ExecutionFailure assertHasNoCause() { if (failure instanceof LocationAwareException) { LocationAwareException exception = (LocationAwareException) failure; assertThat(exception.getReportableCauses(), isEmpty()); } else { assertThat(failure.getCause(), nullValue()); } outputFailure.assertHasNoCause(); return this; }
public ExecutionFailure assertThatDescription(Matcher<String> matcher) { assertThat(description, matcher); outputFailure.assertThatDescription(matcher); return this; }
public ExecutionFailure assertHasFileName(String filename) { assertThat(this.fileName, equalTo(filename)); outputFailure.assertHasFileName(filename); return this; }
public ExecutionFailure assertHasLineNumber(int lineNumber) { assertThat(this.lineNumber, equalTo(String.valueOf(lineNumber))); outputFailure.assertHasLineNumber(lineNumber); return this; }