Examples of BadNodePlacementError


Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testNoMsg_insideNamedMsg() throws Exception {
    compile("<gxp:msg name='NAME'><gxp:nomsg>foo</gxp:nomsg></gxp:msg>");
    assertAlert(new BadNodePlacementError(pos(2, 22), "<gxp:nomsg>", "inside <gxp:msg>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testNoMsg_insideNoMsg() throws Exception {
    compile("<gxp:nomsg><gxp:nomsg>foo</gxp:nomsg></gxp:nomsg>");
    assertAlert(new BadNodePlacementError(pos(2, 12), "<gxp:nomsg>", "inside <gxp:nomsg>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

  public void testPlaceholder_insideNoMsg() throws Exception {
    compile("<gxp:nomsg>",
            "<gxp:ph name='foo'/>foo<gxp:eph/>",
            "</gxp:nomsg>");
    assertAlert(new BadNodePlacementError(pos(3, 1), "<gxp:ph>",
                                          "inside <gxp:nomsg>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

            "<gxp:msg>",
            "bar <gxp:ph name='verb'/>baz<gxp:eph/> quux",
            "</gxp:msg>",
            "</b> zarf",
            "</gxp:nomsg>");
    assertAlert(new BadNodePlacementError(pos(4, 1), "<gxp:msg>",
                                          "inside <gxp:nomsg>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testPlaceholder_outsideMsg() throws Exception {
    compile("<gxp:ph name='foo'/>foo<gxp:eph/>");
    assertAlert(new BadNodePlacementError(pos(2, 1), "<gxp:ph>", "here"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testPlaceholderEnd_nonEmpty() throws Exception {
    compile("<gxp:msg><gxp:ph name='foo'/>x<gxp:eph>text</gxp:eph></gxp:msg>");
    assertAlert(new BadNodePlacementError(pos(2, 40), "text",
                                          "inside <gxp:eph>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

  public void testPlaceholderStart_nonEmpty() throws Exception {
    compile("<gxp:msg>",
            "  <gxp:ph name='foo'>text</gxp:ph>x<gxp:eph/>",
            "</gxp:msg>");
    assertAlert(new BadNodePlacementError(pos(3, 22), "text",
                                          "inside <gxp:ph>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testPlaceholderStart_outsideMsg() throws Exception {
    compile("<gxp:ph name='foo' />");
    assertAlert(new BadNodePlacementError(pos(2, 1), "<gxp:ph>", "here"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

        return node.withChildren(newChildren);
      }

      private ParsedElement reportBadNodeAndContinue(Node badNode,
                                                     Node parentNode) {
        alertSink.add(new BadNodePlacementError(badNode, parentNode));
        return new NullElement(badNode);
      }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

  public void testTemplate_nonRoot() throws Exception {
    compile(
        "<gxp:template"
        + " name='com.google.gxp.compiler.errortests.TestTemplate_nonRoot'>",
        "</gxp:template>");
    assertAlert(new BadNodePlacementError(pos(2,1), "<gxp:template>",
                                          "inside <gxp:template>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.