Package com.google.gdt.eclipse.designer.util

Examples of com.google.gdt.eclipse.designer.util.ModuleDescription


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Test for {@link Utils#getHTMLFile(IFile)}.
   */
  public void test_getHTMLFile_warFolder() throws Exception {
    ModuleDescription module = getTestModuleDescription();
    IFile htmlFile = getFile("war/Module.html");
    assertEquals(htmlFile, Utils.getHTMLFile(module));
  }
View Full Code Here


  @DisposeProjectAfter
  public void test_getHTMLFile_warFolder_withoutWebXML() throws Exception {
    // delete web.xml
    getFile("war/WEB-INF/web.xml").delete(true, null);
    // check
    ModuleDescription module = getTestModuleDescription();
    IFile htmlFile = getFile("war/Module.html");
    assertEquals(htmlFile, Utils.getHTMLFile(module));
  }
View Full Code Here

  @DisposeProjectAfter
  public void test_getHTMLFile_warFolder_emptyWebXML() throws Exception {
    // empty web.xml we can point on it
    setFileContent("war/WEB-INF/web.xml", "");
    // check
    ModuleDescription module = getTestModuleDescription();
    IFile htmlFile = getFile("war/Module.html");
    assertEquals(htmlFile, Utils.getHTMLFile(module));
  }
View Full Code Here

   * http://fogbugz.instantiations.com/fogbugz/default.asp?46836
   */
  @DisposeProjectAfter
  public void test_getHTMLFile_warFolder_invalidWebXML() throws Exception {
    setFileContent("war/WEB-INF/web.xml", "invalid content");
    ModuleDescription module = getTestModuleDescription();
    try {
      Utils.getHTMLFile(module);
      fail();
    } catch (Throwable e) {
      DesignerException de = DesignerExceptionUtils.getDesignerException(e);
View Full Code Here

  /**
   * Test for {@link Utils#getHTMLFile(IFile)}.
   */
  @DisposeProjectAfter
  public void test_getHTMLFile_warFolder_useWelcomeFile() throws Exception {
    ModuleDescription module = getTestModuleDescription();
    // replace default Module.html with file alternative name
    getFile("war/Module.html").delete(true, null);
    IFile htmlFile = setFileContent("war/EntryPoint.html", "<html/>");
    // we can not find "EntryPoint.html", because it has non-default name
    assertEquals(null, Utils.getHTMLFile(module));
View Full Code Here

   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.asp?47616
   */
  @DisposeProjectAfter
  public void test_getHTMLFile_warFolder_useWelcomeFile_whenNoModule() throws Exception {
    ModuleDescription module = getTestModuleDescription();
    setFileContent(
        getTestModuleFile(),
        getSource(
            "<!-- filler filler filler filler filler -->",
            "<module>",
View Full Code Here

  @DisposeProjectAfter
  public void test_getHTMLFile_notExistingSourceFolder() throws Exception {
    // add "src2"
    m_testProject.addSourceFolder("/TestProject/src2");
    //
    ModuleDescription module = getTestModuleDescription();
    IFile htmlFile = Utils.getHTMLFile(module);
    assertResourcePath("war/Module.html", htmlFile);
  }
View Full Code Here

  /**
   * Test for {@link Utils#getCssResources(IFile)}.<br>
   * Only default <code>Module.css</code> resource from HTML.
   */
  public void test_getCssResources_fromHTML() throws Exception {
    ModuleDescription module = getTestModuleDescription();
    List<String> resources = Utils.getCssResources(module);
    assertThat(resources).containsOnly("Module.css");
  }
View Full Code Here

   * Test for combination {@link Utils#getHTMLFile(IFile)} and {@link Utils#getCssResources(IFile)}.
   */
  @DisposeProjectAfter
  public void test_getCssResources_useWelcomeFile_inSubFolder() throws Exception {
    IFile moduleFile = getTestModuleFile();
    ModuleDescription module = getTestModuleDescription();
    // replace default Module.html with file alternative name
    getFile("war/Module.html").delete(true, null);
    IFile htmlFile =
        setFileContent(
            "war/sub/EntryPoint.html",
View Full Code Here

   * Test for {@link Utils#getCssResources(IFile)}.<br>
   * Delete default HTML, so no CSS resources at all.
   */
  @DisposeProjectAfter
  public void test_getCssResources_noHTML() throws Exception {
    ModuleDescription module = getTestModuleDescription();
    // delete Module.html
    getFile("war/Module.html").delete(true, null);
    // no CSS resources
    List<String> resources = Utils.getCssResources(module);
    assertThat(resources).isEmpty();
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.util.ModuleDescription

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.