modules/fxpackager/src/test/java/com/oracle/tools/packager/linux/LinuxRpmBundlerTest.java
Print this page
rev 6889 : RT-36724 - JavaFX Packager Renaming
Summary: Move java code around to new packages.
@@ -21,18 +21,17 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package com.oracle.bundlers.linux;
+package com.oracle.tools.packager.linux;
-import com.oracle.bundlers.Bundler;
-import com.sun.javafx.tools.packager.Log;
-import com.sun.javafx.tools.packager.bundlers.ConfigException;
-import com.sun.javafx.tools.packager.bundlers.LinuxRPMBundler;
-import com.sun.javafx.tools.packager.bundlers.RelativeFileSet;
-import com.sun.javafx.tools.packager.bundlers.UnsupportedPlatformException;
+import com.oracle.tools.packager.Bundler;
+import com.oracle.tools.packager.Log;
+import com.oracle.tools.packager.ConfigException;
+import com.oracle.tools.packager.RelativeFileSet;
+import com.oracle.tools.packager.UnsupportedPlatformException;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -40,11 +39,11 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.*;
-import static com.oracle.bundlers.StandardBundlerParam.*;
+import static com.oracle.tools.packager.StandardBundlerParam.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class LinuxRpmBundlerTest {
@@ -58,11 +57,11 @@
@BeforeClass
public static void prepareApp() {
// only run on linux
Assume.assumeTrue(System.getProperty("os.name").toLowerCase().startsWith("linux"));
- Assume.assumeTrue(LinuxRPMBundler.testTool(LinuxRPMBundler.TOOL_RPMBUILD, LinuxRPMBundler.TOOL_RPMBUILD_MIN_VERSION));
+ Assume.assumeTrue(LinuxRpmBundler.testTool(LinuxRpmBundler.TOOL_RPMBUILD, LinuxRpmBundler.TOOL_RPMBUILD_MIN_VERSION));
Log.setLogger(new Log.Logger(true));
retain = Boolean.parseBoolean(System.getProperty("RETAIN_PACKAGER_TESTS"));
@@ -116,11 +115,11 @@
/**
* See if smoke comes out
*/
@Test
public void smokeTest() throws IOException, ConfigException, UnsupportedPlatformException {
- Bundler bundler = new LinuxRPMBundler();
+ Bundler bundler = new LinuxRpmBundler();
assertNotNull(bundler.getName());
assertNotNull(bundler.getID());
assertNotNull(bundler.getDescription());
//assertNotNull(bundler.getBundleParameters());
@@ -128,11 +127,11 @@
Map<String, Object> bundleParams = new HashMap<>();
bundleParams.put(BUILD_ROOT.getID(), tmpBase);
bundleParams.put(APP_NAME.getID(), "Smoke");
- bundleParams.put(LinuxRPMBundler.BUNDLE_NAME.getID(), "smokeybundlename");
+ bundleParams.put(LinuxRpmBundler.BUNDLE_NAME.getID(), "smokeybundlename");
bundleParams.put(MAIN_CLASS.getID(), "hello.TestPackager");
bundleParams.put(PREFERENCES_ID.getID(), "the/really/long/preferences/id");
bundleParams.put(MAIN_JAR.getID(),
new RelativeFileSet(fakeMainJar.getParentFile(),
new HashSet<>(Arrays.asList(fakeMainJar)))
@@ -162,11 +161,11 @@
*
* All other values will be driven off of those two values.
*/
@Test
public void minimumConfig() throws IOException, ConfigException, UnsupportedPlatformException {
- Bundler bundler = new LinuxRPMBundler();
+ Bundler bundler = new LinuxRpmBundler();
Map<String, Object> bundleParams = new HashMap<>();
bundleParams.put(BUILD_ROOT.getID(), tmpBase);
@@ -177,14 +176,13 @@
System.err.println("Bundle at - " + output);
assertNotNull(output);
assertTrue(output.exists());
}
-
@Test(expected = ConfigException.class)
public void invalidLicenseFile() throws ConfigException, UnsupportedPlatformException {
- Bundler bundler = new LinuxRPMBundler();
+ Bundler bundler = new LinuxRpmBundler();
Map<String, Object> bundleParams = new HashMap<>();
bundleParams.put(BUILD_ROOT.getID(), tmpBase);