Package com.google.gdt.eclipse.designer.model.web

Examples of com.google.gdt.eclipse.designer.model.web.ServletElement


        "  </servlet>",
        "</web-app>");
    assertThat(m_webElement.getChildren()).hasSize(1);
    //
    List<ServletElement> servletElements = m_webElement.getServletElements();
    ServletElement servletElement = servletElements.get(0);
    assertThat(servletElements).hasSize(1);
    assertEquals("someName", servletElement.getName());
    assertEquals("some.Class", servletElement.getClassName());
    // set new "name" value
    {
      servletElement.setName("newName");
      m_webContent = StringUtils.replace(m_webContent, "someName", "newName");
      assertUpdatedModuleFile(m_webContent);
    }
    // set new "class" value
    {
      servletElement.setClassName("new.Class");
      m_webContent = StringUtils.replace(m_webContent, "some.Class", "new.Class");
      assertUpdatedModuleFile(m_webContent);
    }
    // toString()
    assertEquals(
View Full Code Here


   */
  public void test_ServletElement_new() throws Exception {
    parse("<web-app>", "</web-app>");
    assertThat(m_webElement.getChildren()).isEmpty();
    //
    ServletElement servletElement = new ServletElement();
    m_webElement.addChild(servletElement);
    assertEquals(null, servletElement.getName());
    assertEquals(null, servletElement.getClassName());
    // set attributes
    servletElement.setName("newName");
    servletElement.setClassName("new.Class");
    assertEquals("newName", servletElement.getName());
    assertEquals("new.Class", servletElement.getClassName());
    // toString()
    assertEquals(
        getSource(
            "<web-app>",
            "  <servlet>",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.web.ServletElement

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.