コード例 #1
0
 public SingleLineClause withErrorContaining(final String messageFragment) {
   try {
     return new SingleLineClause(unsuccessful.withErrorContaining(messageFragment).in(source));
   } catch (AssertionError e) {
     failureStrategy.fail(e.getMessage());
   }
   return null;
 }
コード例 #2
0
    public SingleFileClause withNoErrorContaining(final String messageFragment) {
      try {
        unsuccessful.withErrorContaining(messageFragment);
      } catch (AssertionError e) {
        return this;
      }
      failureStrategy.fail(
          "Shouldn't have found any errors containing " + messageFragment + ", but we did");

      return this;
    }