Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.classpath7
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.project29
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF12
-rw-r--r--test/org.eclipse.epp.packaging.core.test/build.properties6
-rw-r--r--test/org.eclipse.epp.packaging.core.test/plugin.properties14
-rw-r--r--test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile1
-rw-r--r--test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jarbin16332 -> 0 bytes
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java93
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java26
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java56
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java47
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java111
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java62
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java65
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java47
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java71
17 files changed, 0 insertions, 654 deletions
diff --git a/test/org.eclipse.epp.packaging.core.test/.classpath b/test/org.eclipse.epp.packaging.core.test/.classpath
deleted file mode 100644
index 304e8618..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/test/org.eclipse.epp.packaging.core.test/.project b/test/org.eclipse.epp.packaging.core.test/.project
deleted file mode 100644
index 5bc155ac..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.epp.packaging.core.test</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.epp.packaging.core</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs b/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 27ed6930..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Mar 27 18:41:53 CEST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF b/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 0d255122..00000000
--- a/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.epp.packaging.core.test;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.update.core,
- org.junit,
- org.eclipse.epp.packaging.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/test/org.eclipse.epp.packaging.core.test/build.properties b/test/org.eclipse.epp.packaging.core.test/build.properties
deleted file mode 100644
index 4d892a61..00000000
--- a/test/org.eclipse.epp.packaging.core.test/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- resources/
diff --git a/test/org.eclipse.epp.packaging.core.test/plugin.properties b/test/org.eclipse.epp.packaging.core.test/plugin.properties
deleted file mode 100644
index 11b98fec..00000000
--- a/test/org.eclipse.epp.packaging.core.test/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 Innoopract Informationssysteme GmbH
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Innoopract - initial API and implementation
-###############################################################################
-
-# properties file for org.eclipse.epp.packaging.core.test
-Bundle-Vendor = Eclipse.org
-Bundle-Name = EPP Core Tests \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile b/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile
deleted file mode 100644
index f7fe244d..00000000
--- a/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile
+++ /dev/null
@@ -1 +0,0 @@
-Entry \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar b/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar
deleted file mode 100644
index b86058d4..00000000
--- a/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar
+++ /dev/null
Binary files differ
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java
deleted file mode 100644
index 1b8f285e..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class */
-public class DummyPackagerConfiguration implements IPackagerConfiguration {
-
- private URL siteUrl;
- private IPlatform[] platforms;
- private File baseDir;
- private List<VersionedIdentifier> identifiers = new ArrayList<VersionedIdentifier>();
-
- public File getExtensionSite() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public File getTargetFolder() {
- return baseDir;
- }
-
- public File getPackagerConfigurationFolder() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public void addRequiredFeature( final VersionedIdentifier identifier ) {
- identifiers.add( identifier );
- }
-
- public VersionedIdentifier[] getRequiredFeatures() {
- return identifiers.toArray( new VersionedIdentifier[ identifiers.size() ] );
- }
-
- public IPlatform[] getTargetPlatforms() {
- return platforms;
- }
-
- public String getRootFileBaseName() {
- return "Rootfile"; //$NON-NLS-1$
- }
-
- public URL[] getUpdateSites() {
- return new URL[]{
- siteUrl
- };
- }
-
- public void setUpdateSite( final String site ) throws MalformedURLException {
- this.siteUrl = new URL( site );
- }
-
- public void setTargetPlatforms( final IPlatform[] platformArray ) {
- this.platforms = platformArray;
- }
-
- public void setBaseFolder( final String baseFolder ) {
- this.baseDir = new File( baseFolder );
- }
-
- public File getRootFileFolder() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getProductName() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getEclipseProductId() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getInitialPerspectiveId() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java
deleted file mode 100644
index 1b4adcb4..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class*/
-public class PluginUtils_PdeTest extends TestCase {
-
- public void testFindRuntimeCore() throws Exception {
- String pluginPath = PluginUtils.getPluginPath( "org.eclipse.core.runtime" ); //$NON-NLS-1$
- Assert.assertNotNull( pluginPath );
- Assert.assertTrue( new File( pluginPath ).exists() );
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java
deleted file mode 100644
index 15e12a1f..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class */
-public class CommandLineParser_Test extends TestCase {
-
- public void testParsesConfigFile() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml"} ); //$NON-NLS-1$
- Assert.assertEquals( "eclipsepackager.xml", command.getConfigurationFile().getName() ); //$NON-NLS-1$
- }
-
- public void testDefaultTasks() {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml"} ); //$NON-NLS-1$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- Assert.assertTrue( command.mustDo( Task.BUILD ) );
- }
-
- public void testParsesTasks() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml", "check", "install"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- }
-
- public void testParsesAllTasks() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml", "check", "install", "build"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- Assert.assertTrue( command.mustDo( Task.BUILD ) );
- }
-
- public void testBadArgumentType() throws Exception {
- try {
- ArgumentParser.parse( Boolean.TRUE );
- fail();
- } catch( IllegalArgumentException e ) {
- // expected exception
- }
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java
deleted file mode 100644
index 808c5d70..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import org.eclipse.epp.packaging.core.configuration.Platform;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/**Test class */
-public class Platform_Test extends TestCase {
-
- public void testEquals() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Platform secondPlatform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertTrue( platform.equals( secondPlatform ) );
- }
-
- public void testToString() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "win32,win32,x86", platform.toString() ); //$NON-NLS-1$
- }
-
- public void testAdvancedToString() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "win32nwin32nx86", platform.toString( 'n' ) ); //$NON-NLS-1$
- }
-
- public void testDefaultArchiveFormat() {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "antZip", platform.getArchiveFormat().name() ); //$NON-NLS-1$
- }
-
- public void testSetArchiveFormat() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- platform.setArchiveFormat( "tar" ); //$NON-NLS-1$
- Assert.assertEquals( "tar", platform.getArchiveFormat().name() ); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java
deleted file mode 100644
index 95366fc9..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-import java.io.File;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.epp.packaging.core.configuration.ArchiveFormat;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.configuration.Platform;
-import org.eclipse.epp.packaging.core.configuration.xml.ConfigurationParser;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class */
-public class ConfigurationParser_PdeTest extends TestCase {
-
- private final static String xml = "<configuration>" //$NON-NLS-1$
- + "<rcp version=\"3.2\"/>" //$NON-NLS-1$
- + "<product name=\"EPPBuild\"" //$NON-NLS-1$
- + " eclipseProductId=\"org.eclipse.platform.ide\"" //$NON-NLS-1$
- + " initialPerspectiveId=\"org.eclipse.cdt.ui.CPerspective\" />" //$NON-NLS-1$
- + "<updateSites>" //$NON-NLS-1$
- + " <updateSite url=\"http://update.eclipse.org/updates/3.2/\"/>" //$NON-NLS-1$
- + "</updateSites>" //$NON-NLS-1$
- + "<requiredFeatures>" //$NON-NLS-1$
- + " <feature id=\"org.eclipse.rcp\" version=\"3.1.1\"/>" //$NON-NLS-1$
- + "</requiredFeatures>" //$NON-NLS-1$
- + "<packagerConfigurationFolder folder=\"/home/help\"/>" //$NON-NLS-1$
- + "<rootFileFolder folder=\"/home/root\"/>" //$NON-NLS-1$
- + "<extensionSite relativeFolder=\"site\"/>" //$NON-NLS-1$
- + "<targetPlatforms>" //$NON-NLS-1$
- + " <platform os=\"linux\" ws=\"gtk\" arch=\"x86\">" //$NON-NLS-1$
- + " <eclipseIniFileContent path=\"/eclipse/\">Content" //$NON-NLS-1$
- + "of first eclipse.ini</eclipseIniFileContent>" //$NON-NLS-1$
- + " </platform>" //$NON-NLS-1$
- + " <platform os=\"win32\" ws=\"win32\" arch=\"x86\">" //$NON-NLS-1$
- + " <archiveFormat format=\"tar\"/>" //$NON-NLS-1$
- + " <eclipseIniFileContent path=\"/eclipse/\">Content" //$NON-NLS-1$
- + "of second eclipse.ini</eclipseIniFileContent>" //$NON-NLS-1$
- + " </platform>" //$NON-NLS-1$
- + "</targetPlatforms>" //$NON-NLS-1$
- + "</configuration>"; //$NON-NLS-1$
-
- public void testParseUpdateSites() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( "http://update.eclipse.org/updates/3.2/", //$NON-NLS-1$
- config.getUpdateSites()[ 0 ].toExternalForm() );
- }
-
- public void testParseFeatures() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( new VersionedIdentifier( "org.eclipse.rcp", "3.1.1" ), //$NON-NLS-1$ //$NON-NLS-2$
- config.getRequiredFeatures()[ 0 ] );
- }
-
- public void testParsePackagerConfigurationFolder() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( new File( "/home/help" ), //$NON-NLS-1$
- config.getPackagerConfigurationFolder() );
- }
-
- public void testParseRelativeExtensionSite() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( new File( org.eclipse.core.runtime.Platform.getLocation()
- .toFile(),
- "site" ), //$NON-NLS-1$
- config.getExtensionSite() );
- }
-
- public void testParseTargetPlatformWithoutFormat() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- IPlatform platform = config.getTargetPlatforms()[ 0 ];
- Assert.assertEquals( new Platform( "linux", "gtk", "x86", null, null ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- platform );
- Assert.assertEquals( ArchiveFormat.antZip, platform.getArchiveFormat() );
- }
-
- public void testParsePlatformWithFormat() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- IPlatform platform = config.getTargetPlatforms()[ 1 ];
- Assert.assertEquals( new Platform( "win32", "win32", "x86", null, null ), platform ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( ArchiveFormat.tar, platform.getArchiveFormat() );
- }
-
- public void testParseRcpVersion() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- String basename = config.getRootFileBaseName();
- Assert.assertEquals( "eclipse-platform-3.2-", basename ); //$NON-NLS-1$
- }
-
- public void testParseRootFiles() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- File folder = config.getRootFileFolder();
- Assert.assertEquals( new File( "/home/root" ), folder ); //$NON-NLS-1$
- }
-
- public void testParseProductName() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( "EPPBuild", config.getProductName() ); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java
deleted file mode 100644
index 4e8e5644..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.download.SiteCreator;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.SiteManager;
-
-/** Test class */
-public class SiteCreator_PdeTest extends TestCase {
-
- private static final String SITE = "./site"; //$NON-NLS-1$
-
- public void testFilesAreCreated() throws IOException, CoreException {
- SiteCreator.createInstallationSite( new File( SITE ) );
- Assert.assertTrue( new File( SITE ).exists() );
- }
-
- public void testExtensionSiteIsCreated() throws IOException, CoreException {
- IConfiguredSite site = SiteCreator.createInstallationSite( new File( SITE ) );
- Assert.assertTrue( site.isExtensionSite() );
- Assert.assertTrue( site.isEnabled() );
- Assert.assertTrue( site.isUpdatable() );
- }
-
- public void testClearExtensionSite() throws CoreException, IOException {
- SiteCreator.createInstallationSite( new File( SITE ) );
- SiteCreator.removeInstallationSite( SITE );
- IConfiguredSite[] configuredSites = SiteManager.getLocalSite()
- .getCurrentConfiguration()
- .getConfiguredSites();
- File file = new File( SITE );
- String fileUrl = file.toURL().toExternalForm() + "eclipse/"; //$NON-NLS-1$
- for( IConfiguredSite site : configuredSites ) {
- Assert.assertFalse( site.getSite()
- .getURL()
- .toExternalForm()
- .equals( fileUrl ) );
- }
- Assert.assertFalse( file.exists() );
- }
-
- @Override
- public void tearDown() throws CoreException, MalformedURLException
- {
- SiteCreator.removeInstallationSite( SITE );
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java
deleted file mode 100644
index 3d8457e7..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.DummyPackagerConfiguration;
-import org.eclipse.epp.packaging.core.download.UpdateSiteManager;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class*/
-public class UpdateSiteManager_PdeTest extends TestCase {
-
- private static final String UPDATESITE_URL
- = "http://download.eclipse.org/eclipse/updates/"; //$NON-NLS-1$
- private static final VersionedIdentifier FEATURE_1
- = new VersionedIdentifier( "org.eclipse.platform", //$NON-NLS-1$
- "2.0.0" ); //$NON-NLS-1$
- private static final VersionedIdentifier FEATURE_2
- = new VersionedIdentifier( "org.eclipse.jdt", //$NON-NLS-1$
- "2.0.0" ); //$NON-NLS-1$
- private DummyPackagerConfiguration configuration;
- private UpdateSiteManager manager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.configuration = new DummyPackagerConfiguration();
- this.configuration.setUpdateSite( UPDATESITE_URL );
- this.configuration.addRequiredFeature( FEATURE_1 );
- this.configuration.addRequiredFeature( FEATURE_2 );
- this.manager = new UpdateSiteManager( this.configuration );
- }
-
- // For some reason, this fails with the local update site.
- public void testGetFeature()
- throws CoreException, MalformedURLException, IOException
- {
- IFeature[] feature = this.manager.getFeatures();
- Assert.assertEquals( 2, feature.length );
- }
-
- public void testAllFeaturesPresent()
- throws MalformedURLException, IOException, CoreException
- {
- this.manager = new UpdateSiteManager( this.configuration );
- Assert.assertTrue( this.manager.areFeaturesPresent( new VersionedIdentifier[]{
- FEATURE_1, FEATURE_2
- } ) );
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java
deleted file mode 100644
index f0755d93..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-
-import org.eclipse.epp.packaging.core.io.FileUtils;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class */
-public class FileUtils_Test extends TestCase {
-
- public void testFileIsCopied() throws Exception {
- FileUtils.copy( "./resources/test/singleentryfile", //$NON-NLS-1$
- "./resources/test/copy" ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy" ).exists() ); //$NON-NLS-1$
- }
-
- public void testCopyFileDirectly() throws Exception {
- FileUtils.copy( new File( "./resources/test/singleentryfile" ), //$NON-NLS-1$
- new File( "./resources/test/copy" ) ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy" ).exists() ); //$NON-NLS-1$
- }
-
- public void testDirectoryIsCreated() throws Exception {
- FileUtils.copy( "./resources/test/singleentryfile", //$NON-NLS-1$
- "./resources/test/copy/copy" ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy/copy" ).exists() ); //$NON-NLS-1$
- new File( "./resources/test/copy/copy" ).delete(); //$NON-NLS-1$
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- new File( "./resources/test/copy" ).delete(); //$NON-NLS-1$
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java
deleted file mode 100644
index 4f1ff4df..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.epp.packaging.core.io.Zip;
-
-/** Test class */
-public class Zip_Test extends TestCase {
-
- private static final String TEST_ZIP_PATH
- = "./resources/test/test.zip"; //$NON-NLS-1$
- private Zip zip = null;
-
- @Override
- protected void setUp() throws Exception
- {
- this.zip = new Zip( new File( TEST_ZIP_PATH ) );
- }
-
- public void testCreateZipFile() throws Exception {
- this.zip.addFile( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.close();
- Assert.assertTrue( new File( TEST_ZIP_PATH ).exists() );
- }
-
- public void testAddFile() throws Exception {
- this.zip.addFile( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.close();
- ZipFile zipFile = new ZipFile( TEST_ZIP_PATH );
- ZipEntry entry = zipFile.getEntry( "resources/test/singleentryfile" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- // TODO test fails sometimes when not in debug mode... timing problem?
- public void testAddFolder() throws Exception {
- this.zip.addFolder( new File( "./resources/test/updatesite/features" ) ); //$NON-NLS-1$
- this.zip.close();
- ZipFile zipFile = new ZipFile( TEST_ZIP_PATH );
- ZipEntry entry = zipFile.getEntry( "org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- // TODO test fails sometimes when not in debug mode... timing problem?
- public void testAddFileAs() throws Exception {
- File testFile = new File( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.addFileAs( testFile, "eclipse/configuration/config.ini" ); //$NON-NLS-1$
- this.zip.close();
- ZipEntry entry = new ZipFile( TEST_ZIP_PATH ).getEntry( "eclipse/configuration/config.ini" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- new File( TEST_ZIP_PATH ).delete();
- }
-}

Back to the top