modules/fxpackager/src/test/java/com/oracle/bundlers/windows/WinAppBundlerTest.java

Print this page

        

@@ -24,11 +24,10 @@
  */
 
 package com.oracle.bundlers.windows;
 
 import com.oracle.bundlers.Bundler;
-import com.oracle.bundlers.StandardBundlerParam;

 import com.sun.javafx.tools.packager.Log;
 import com.sun.javafx.tools.packager.bundlers.ConfigException;
 import com.sun.javafx.tools.packager.bundlers.RelativeFileSet;
 import com.sun.javafx.tools.packager.bundlers.UnsupportedPlatformException;
 import com.sun.javafx.tools.packager.bundlers.WinAppBundler;

@@ -42,10 +41,11 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.util.*;
 
+import static com.oracle.bundlers.StandardBundlerParam.*;

 import static org.junit.Assert.*;
 
 public class WinAppBundlerTest {
 
     static File tmpBase;

@@ -112,24 +112,24 @@
      * See if smoke comes out
      */
     @Test
     public void smokeTest() throws IOException, ConfigException, UnsupportedPlatformException {
         Bundler bundler = new WinAppBundler();
-        ((WinAppBundler)bundler).setVerbose(true);

         
         assertNotNull(bundler.getName());
         assertNotNull(bundler.getID());
         assertNotNull(bundler.getDescription());
         //assertNotNull(bundler.getBundleParameters());
 
         Map<String, Object> bundleParams = new HashMap<>();
 
-        bundleParams.put(StandardBundlerParam.BUILD_ROOT.getID(), tmpBase);

+        bundleParams.put(BUILD_ROOT.getID(), tmpBase);

 
-        bundleParams.put(StandardBundlerParam.NAME.getID(), "Smoke");

-        bundleParams.put(StandardBundlerParam.MAIN_CLASS.getID(), "hello.TestPackager");

-        bundleParams.put(StandardBundlerParam.APP_RESOURCES.getID(), new RelativeFileSet(appResourcesDir, appResources));

+        bundleParams.put(APP_NAME.getID(), "Smoke");

+        bundleParams.put(MAIN_CLASS.getID(), "hello.TestPackager");

+        bundleParams.put(APP_RESOURCES.getID(), new RelativeFileSet(appResourcesDir, appResources));

+        bundleParams.put(VERBOSE.getID(), true);

 
         File output = bundler.execute(bundleParams, new File(workDir, "smoke"));
         validatePackageCfg(output);
     }
 

@@ -143,17 +143,16 @@
      * All other values will be driven off of those two values.
      */
     @Test
     public void minimumConfig() throws IOException, ConfigException, UnsupportedPlatformException {
         Bundler bundler = new WinAppBundler();
-        ((WinAppBundler)bundler).setVerbose(true);

 
         Map<String, Object> bundleParams = new HashMap<>();
 
-        bundleParams.put(StandardBundlerParam.BUILD_ROOT.getID(), tmpBase);

+        bundleParams.put(BUILD_ROOT.getID(), tmpBase);

 
-        bundleParams.put(StandardBundlerParam.APP_RESOURCES.getID(), new RelativeFileSet(appResourcesDir, appResources));

+        bundleParams.put(APP_RESOURCES.getID(), new RelativeFileSet(appResourcesDir, appResources));

 
         File output = bundler.execute(bundleParams, new File(workDir, "BareMinimum"));
         validatePackageCfg(output);
         assertTrue(output.isDirectory());
     }