Package info.bliki.html

Examples of info.bliki.html.HTML2WikiConverter


    String result = conv.toWiki(new ToMoinMoin());
    assertEquals(result, " ");
  }

  public void test14() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    // invalid nested html test
    conv
        .setInputHTML("<h2>the <a href=\"http://good\">good</a></h2><h3>the <div>bad</div></h3><h2>and <b><i>the</i> ugly</b></h2>");
    String result = conv.toWiki(new ToMoinMoin());
    assertEquals(result, "\n" + "== the good ==\n" + "\n" + "=== the bad ===\n" + "\n" + "== and the ugly ==\n");
  }
View Full Code Here


    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "   ");
  }

  public void test13() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    conv.setInputHTML("<div> </div>");
    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, " ");
  }
View Full Code Here

    String result = conv.toWiki(new ToMoinMoin());
    assertEquals(result, "\n" + "== the good ==\n" + "\n" + "=== the bad ===\n" + "\n" + "== and the ugly ==\n");
  }

  public void test15() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    // invalid nested html test
    conv.setInputHTML("The <a href=\"http://good\">good</a> the <div>bad</div> and <b><i>the</i> ugly</b>");
    String result = conv.toWiki(new ToMoinMoin());
    assertEquals(result, "The [[good]] the bad and '''''the'' ugly'''");
  }
View Full Code Here

    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, " ");
  }

  public void test14() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    // invalid nested html test
    conv.setInputHTML("<h2>the <a href=\"http://good\">good</a></h2><h3>the <div>bad</div></h3><h2>and <b><i>the</i> ugly</b></h2>");
    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "\n" + "== the good ==\n" + "\n" + "=== the bad ===\n" + "\n" + "== and the ugly ==\n");
  }
View Full Code Here

    assertEquals(result, "The [[good]] the bad and '''''the'' ugly'''");
  }

  public static void main(String[] args) {
    try {
      HTML2WikiConverter conv = new HTML2WikiConverter();
      conv.setInputHTML("<b>hello</b> <em>world</em>");
      System.out.print(conv.toWiki(new ToMoinMoin()));

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "\n" + "== the good ==\n" + "\n" + "=== the bad ===\n" + "\n" + "== and the ugly ==\n");
  }
 
  public void test15() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    // invalid nested html test
    conv.setInputHTML("The <a href=\"http://good\">good</a> the <div>bad</div> and <b><i>the</i> ugly</b>");
    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "The [[good]] the \n" +
        "<div>bad\n" +
        "</div> and '''''the'' ugly'''");
  }
View Full Code Here

        "<div>bad\n" +
        "</div> and '''''the'' ugly'''");
  }
 
  public void test16() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    conv.setInputHTML(" <table>\n<tr>\n" +
        "                    <td align=\"left\" valign=\"top\">accesskey</td>\n" +
        "                    <td align=\"left\" valign=\"top\">false</td>\n" +
        "                    <td align=\"left\" valign=\"top\"></td>              <!----  empty cell -->\n" +
        "                    <td align=\"left\" valign=\"top\">false</td>\n" +
        "                    <td align=\"left\" valign=\"top\">String</td>\n" +
        "                    <td align=\"left\" valign=\"top\">Set the html accesskey attribute on rendered html element</td>\n" +
        "   </tr></table>");
    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "          \n" +
        "{| border=\"1\"\n" +
        "|-\n" +
        "|accesskey\n" +
        "|false\n" +
View Full Code Here

        "|Set the html accesskey attribute on rendered html element\n" +
        "|}");
  }
 
  public void test17() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    conv.setInputHTML(" <table>\n<tr>\n" +
        "                    <td align=\"left\" valign=\"top\"></td>             \n" +
        "   </tr></table>");
    String result = conv.toWiki(new ToWikipedia());
    assertEquals(result, "    \n" +
        "{| border=\"1\"\n" +
        "|-\n" +
        "| \n" +
        "|}");
View Full Code Here

        "|}");
  }
 
  public static void main(String[] args) {
    try {
      HTML2WikiConverter conv = new HTML2WikiConverter();
      conv.setInputHTML("<b>hello</b> <em>world</em>");
      System.out.print(conv.toWiki(new ToWikipedia()));

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  public HTML2GoogleCodeTest(String name) {
    super(name);
  }
 
  public void test0() {
    HTML2WikiConverter conv = new HTML2WikiConverter();
    conv.setInputHTML("<b>hello<em>world</em></b>");
    String result = conv.toWiki(new ToGoogleCode());
    assertEquals(result, "*hello_world_*");
  }
 
View Full Code Here

TOP

Related Classes of info.bliki.html.HTML2WikiConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.