Package org.rhq.core.util

Examples of org.rhq.core.util.IniEditor$Comment


        outputString(ftfw,     content));
  }
 
  @Test
  public void testComment() {
    Comment content = new Comment("comment");
    assertEquals("<!--comment-->",
        outputString(fraw,     content));
    assertEquals("<!--comment-->",
        outputString(fcompact, content));
    assertEquals("<!--comment-->",
View Full Code Here


  }
 
  @Test
  public void testDocumentComment() {
    Document content = new Document();
    content.addContent(new Comment("comment"));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--comment-->\n",
        outputString(fraw,     content));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--comment-->\n",
        outputString(fcompact, content));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--comment-->\n",
View Full Code Here

  @Test
  public void testOutputComment() {
    String incomment = "   hello   there  bozo !   ";
    String outcomment = "<!--" + incomment + "-->";
    checkOutput(new Comment(incomment), outcomment, outcomment, outcomment, outcomment, outcomment);
  }
View Full Code Here

    // down in to normal (not preserve).
   
    // this is essentially a test of the FormatStack code....

    Element tst = new Element("child");
    Comment cmt = new Comment("comment");
    tst.addContent(cmt);
    String spaced = "  <child>\n    <!--comment-->\n  </child>\n";
    String compact = "<child><!--comment--></child>";
    String preserved = "<child xml:space=\"preserve\"><!--comment--></child>";
    Element root = new Element("root");
View Full Code Here

    root.addContent(new Text(" "));
    root.addContent(new Text("    "));
    root.addContent(new Text(""));
    root.addContent(new Text(" "));
    root.addContent(new Text("  \n \n "));
    root.addContent(new Comment("Boo"));
    root.addContent(new Text("  \t "));
    root.addContent(new Text("  "));
    FormatSetup fs = new FormatSetup() {
      @Override
      public void setup(Format fmt) {
View Full Code Here

  @Test
  public void testOutputElementMixedMultiCDATA() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new CDATA("A"));
    FormatSetup fs = new FormatSetup() {
      @Override
      public void setup(Format fmt) {
View Full Code Here

  @Test
  public void testOutputElementMixedMultiEntityRef() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new EntityRef("aer"));
    FormatSetup fs = new FormatSetup() {
      @Override
      public void setup(Format fmt) {
View Full Code Here

  @Test
  public void testOutputElementMixedMultiText() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new Text("txt"));
    FormatSetup fs = new FormatSetup() {
      @Override
      public void setup(Format fmt) {
View Full Code Here

  @Test
  public void testOutputElementMixedMultiZeroText() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(""));
    root.addContent(new Text(" "));
    root.addContent(new Text(""));
    root.addContent(new Text("txt"));
    root.addContent(new Text(""));
View Full Code Here

TOP

Related Classes of org.rhq.core.util.IniEditor$Comment

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.