@Test
 public void testBigContent() throws Exception {
   StringBuilder buffer = new StringBuilder();
   for (int i = 0; i < 1000; i++) buffer.append("abcdefghijklmnopqrstuvwxyz");
   WikiPageUtil.addPage(root, PathParser.parse("BigPage"), buffer.toString());
   String content = root.getChildPage("BigPage").getData().getContent();
   assertTrue(buffer.toString().equals(content));
 }
Beispiel #2
1
 private String tableElementToString(Element tableElement) {
   StringBuilder result = new StringBuilder();
   result.append("[");
   rowsToString(tableElement, result);
   result.append("]");
   return result.toString();
 }
  private String convertToWikiText(Collection<GitVersionInfo> history) {
    final SimpleDateFormat dateFormat =
        new SimpleDateFormat(FitNesseContext.recentChangesDateFormat);
    StringBuilder builder = new StringBuilder(1024);

    for (GitVersionInfo versionInfo : history) {
      builder
          .append("|")
          .append(versionInfo.getComment())
          .append("|")
          .append(versionInfo.getAuthor())
          .append("|")
          .append(dateFormat.format(versionInfo.getCreationTime()))
          .append("|\n");
    }
    return builder.toString();
  }