コード例 #1
0
  public void testVerifyJBossHomeWhenFileInsteadOfDirectory() throws Exception {
    this.fsManager.resolveFile("ram:///jboss/bin").createFile();

    this.container.setFileHandler(this.fileHandler);

    try {
      this.container.verifyJBossHome();
      fail("Should have thrown an exception here");
    } catch (ContainerException expected) {
      assertEquals(
          "Invalid JBoss installation. The [ram:///jboss/bin] path should be a "
              + "directory. Make sure the JBoss container home directory you have specified "
              + "points to the right location (It's currently pointing to [ram:///jboss])",
          expected.getMessage());
    }
  }
コード例 #2
0
  public void testVerifyWeblogicHomeWhenMissingDirectory() throws Exception {
    this.container.setFileHandler(this.fileHandler);

    try {
      this.container.verifyWeblogicHome();
      fail("Should have thrown an exception here");
    } catch (ContainerException expected) {
      assertEquals(
          "Invalid Weblogic installation. The ["
              + WL_HOME
              + "/server/lib] directory doesn't "
              + "exist. Make sure the WL_HOME directory you have specified "
              + "points to the right location (It's currently pointing to ["
              + WL_HOME
              + "])",
          expected.getMessage());
    }
  }
コード例 #3
0
  public void testVerifyWeblogicHomeWhenEmptyDirectory() throws Exception {
    this.fsManager.resolveFile(WL_HOME + "/server/lib").createFolder();

    this.container.setFileHandler(this.fileHandler);

    try {
      this.container.verifyWeblogicHome();
      fail("Should have thrown an exception here");
    } catch (ContainerException expected) {
      assertEquals(
          "Invalid Weblogic installation. The ["
              + WL_HOME
              + "/server/lib] directory is empty "
              + "and it shouldn't be. Make sure the WL_HOME directory you have specified "
              + "points to the right location (It's currently pointing to ["
              + WL_HOME
              + "])",
          expected.getMessage());
    }
  }
コード例 #4
0
  public void testVerifyJBossHomeWhenMissingDirectory() throws Exception {
    this.fsManager.resolveFile("ram:///jboss/bin/run.jar").createFile();
    this.fsManager.resolveFile("ram:///jboss/bin/shutdown.jar").createFile();
    this.fsManager.resolveFile("ram:///jboss/lib/something").createFile();
    this.fsManager.resolveFile("ram:///jboss/lib/endorsed/something").createFile();
    this.fsManager.resolveFile("ram:///jboss/server/something").createFile();

    this.container.setFileHandler(this.fileHandler);

    try {
      this.container.verifyJBossHome();
      fail("Should have thrown an exception here");
    } catch (ContainerException expected) {
      assertEquals(
          "Invalid JBoss installation. The [ram:///jboss/client] directory doesn't "
              + "exist. Make sure the JBoss container home directory you have specified points "
              + "to the right location (It's currently pointing to [ram:///jboss])",
          expected.getMessage());
    }
  }