< prev index next >

test/jdk/tools/jpackage/createinstaller/windows/base/JPackageCreateInstallerWinMenuBase.java

Print this page




  58         if (folder.exists()) {
  59             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  60         }
  61 
  62         // Validate start menu
  63         JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false);
  64     }
  65 
  66     private static void init(String name, String ext) {
  67         TEST_NAME = name;
  68         EXT = ext;
  69         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  70         CMD = new String[]{
  71             "create-installer",
  72             "--installer-type", EXT,
  73             "--input", "input",
  74             "--output", "output",
  75             "--name", TEST_NAME,
  76             "--main-jar", "hello.jar",
  77             "--main-class", "Hello",
  78             "--overwrite",
  79             "--files", "hello.jar",
  80             "--win-menu"};
  81     }
  82 
  83     public static void run(String name, String ext) throws Exception {
  84         init(name, ext);
  85 
  86         if (JPackageInstallerHelper.isVerifyInstall()) {
  87             verifyInstall();
  88         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  89             verifyUnInstall();
  90         } else {
  91             JPackageHelper.createHelloInstallerJar();
  92             testCreateInstaller();
  93         }
  94     }
  95 }


  58         if (folder.exists()) {
  59             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  60         }
  61 
  62         // Validate start menu
  63         JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false);
  64     }
  65 
  66     private static void init(String name, String ext) {
  67         TEST_NAME = name;
  68         EXT = ext;
  69         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  70         CMD = new String[]{
  71             "create-installer",
  72             "--installer-type", EXT,
  73             "--input", "input",
  74             "--output", "output",
  75             "--name", TEST_NAME,
  76             "--main-jar", "hello.jar",
  77             "--main-class", "Hello",

  78             "--files", "hello.jar",
  79             "--win-menu"};
  80     }
  81 
  82     public static void run(String name, String ext) throws Exception {
  83         init(name, ext);
  84 
  85         if (JPackageInstallerHelper.isVerifyInstall()) {
  86             verifyInstall();
  87         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  88             verifyUnInstall();
  89         } else {
  90             JPackageHelper.createHelloInstallerJar();
  91             testCreateInstaller();
  92         }
  93     }
  94 }
< prev index next >