Ejemplo n.º 1
0
  private void doInstall(OperationContainer<InstallSupport> installContainer)
      throws OperationException {
    InstallSupport support = installContainer.getSupport();
    assertNotNull(support);

    InstallSupport.Validator v = support.doDownload(null, false);
    assertNotNull(v);
    InstallSupport.Installer i = support.doValidate(v, null);
    assertNotNull(i);
    Restarter r = null;
    try {
      r = support.doInstall(i, null);
    } catch (OperationException ex) {
      if (OperationException.ERROR_TYPE.INSTALL == ex.getErrorType()) {
        // can ingore
        // module system cannot load the module either
      } else {
        fail(ex.toString());
      }
    }
    assertNull("Installing new element require restarting though it should not", r);
  }