Exemple #1
0
 public void assertMessages(@Nullable String message) {
   if (message == null) {
     message = "";
   } else {
     message = message.trim();
   }
   Collections.sort(messages);
   String have = StringUtil.iterableToString(messages, "\n");
   Assert.assertEquals(message, have);
 }
  private static void append(final StringBuilder sb, final TestSpec spec) {
    TestSpecDescription desc = spec.getDescription();

    String text =
        StringUtil.replaceAll(desc.getText().replaceAll(Pattern.quote("\n"), "<br>"), "  ", " ")
            .replaceAll(Pattern.quote("<br> "), "<br>");
    sb.append(desc.getUsed());
    sb.append(" | ");
    sb.append(desc.getUsedBy());
    sb.append(" | ");
    sb.append(desc.getChange());
    sb.append(" | ");
    sb.append(spec.getResult());
    sb.append(" | ");
    sb.append(text);
    sb.append("\n");
  }