Package gnu.javax.swing.text.html.parser.support

Examples of gnu.javax.swing.text.html.parser.support.Parser


  /* Testing private methods of entity resolver. */
  public void testResolver()
                    throws Exception
  {
    Parser p =
      new Parser(HTML_401F.getInstance())
      {
        public void error(String a, String b)
        {
        }
      };

    Method rn =
      p.getClass().getSuperclass().getDeclaredMethod("resolveNamedEntity",
                                                     new Class[] { String.class }
                                                    );
    rn.setAccessible(true);

    assertEquals(exe(p, rn, "&amp"), "&");
    assertEquals(exe(p, rn, "&AMP"), "&");
    assertEquals(exe(p, rn, "&amp"), "&");
    assertEquals(exe(p, rn, "&amP"), "&");

    assertEquals(exe(p, rn, "&;"), "&;");
    assertEquals(exe(p, rn, "&audrius;"), "&audrius;");

    rn =
      p.getClass().getSuperclass().getDeclaredMethod("resolveNumericEntity",
                                                     new Class[] { String.class }
                                                    );
    rn.setAccessible(true);

    assertEquals(exe(p, rn, "&#x55"), "U");
View Full Code Here

TOP

Related Classes of gnu.javax.swing.text.html.parser.support.Parser

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.