diff options
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.db.tests')
28 files changed, 0 insertions, 1327 deletions
diff --git a/jpa/tests/org.eclipse.jpt.db.tests/.classpath b/jpa/tests/org.eclipse.jpt.db.tests/.classpath deleted file mode 100644 index ef8d91ca94..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/.classpath +++ /dev/null @@ -1,11 +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"> - <accessrules> - <accessrule kind="accessible" pattern="org/eclipse/jpt/utility/**"/> - </accessrules> - </classpathentry> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/jpa/tests/org.eclipse.jpt.db.tests/.cvsignore b/jpa/tests/org.eclipse.jpt.db.tests/.cvsignore deleted file mode 100644 index ba077a4031..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/jpa/tests/org.eclipse.jpt.db.tests/.project b/jpa/tests/org.eclipse.jpt.db.tests/.project deleted file mode 100644 index f5b0127a1e..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.jpt.db.tests</name> - <comment></comment> - <projects> - </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/jpa/tests/org.eclipse.jpt.db.tests/.settings/org.eclipse.core.resources.prefs b/jpa/tests/org.eclipse.jpt.db.tests/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index b23d0c7038..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Jan 15 11:11:11 EST 2008 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/jpa/tests/org.eclipse.jpt.db.tests/META-INF/MANIFEST.MF b/jpa/tests/org.eclipse.jpt.db.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 23cadfc899..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-Vendor: %providerName -Bundle-SymbolicName: org.eclipse.jpt.db.tests -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.eclipse.jpt.db.tests.internal.JptDbTestsPlugin -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Eclipse-LazyStart: false -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", - org.junit;bundle-version="[3.8.2,4.0.0)", - org.eclipse.datatools.connectivity;bundle-version="[1.1.0,1.2.0)", - org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,1.2.0)", - org.eclipse.jpt.utility;bundle-version="[1.2.0,2.0.0)", - org.eclipse.jpt.db;bundle-version="[1.1.1,2.0.0)" -Export-Package: org.eclipse.jpt.db.tests.internal;x-internal:=true, - org.eclipse.jpt.db.tests.internal.platforms;x-internal:=true diff --git a/jpa/tests/org.eclipse.jpt.db.tests/about.html b/jpa/tests/org.eclipse.jpt.db.tests/about.html deleted file mode 100644 index be534ba44f..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>May 02, 2008</P> - -<H3>License</H3> - -<P>The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. -For purposes of the EPL, "Program" will mean the Content.</P> - -<P>If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor's license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> - -</BODY> -</HTML> diff --git a/jpa/tests/org.eclipse.jpt.db.tests/build.properties b/jpa/tests/org.eclipse.jpt.db.tests/build.properties deleted file mode 100644 index cd0d010fd1..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2007 Oracle. -# 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: -# Oracle - initial API and implementation -############################################################################### -source.. = src/ -output.. = bin/ -bin.includes = .,\ - META-INF/,\ - plugin.properties diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/derby101.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/derby101.properties deleted file mode 100644 index 1d97add8dd..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/derby101.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver class name - org.apache.derby.jdbc.EmbeddedDriver -# -profileName = derby101 -profileDescription = Derby Embedded JDBC Profile for Testing -# set user name -userName = -userPassword = -# set path to Derby driver here (example: databasedriverJarList = c:/derbydb/lib/derby.jar ) -databasedriverJarList = -databaseName = testdb -# set database URL here (example: databaseUrl = jdbc:derby:c:/derbydb/testdb;create=true ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/mysql41.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/mysql41.properties deleted file mode 100644 index 4ac94784bb..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/mysql41.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# -# Driver class (jconn3.jar) - com.mysql.jdbc.Driver -# -profileName = mysq41 -profileDescription = MySql 4.1.16 JDBC Profile for Testing -# set user name -userName = -userPassword = -# set path to Derby driver here (example: databasedriverJarList = C:/jlib/mysql-connector-java-3.1.7-bin.jar ) -databasedriverJarList = -databaseName = testdb -# set database URL here (example: databaseUrl = jdbc:sybase:Tds:localhost:5000/testdb ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10g.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10g.properties deleted file mode 100644 index 603e56d7db..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10g.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - jar list separate by comma (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver: oracle.jdbc.OracleDriver -# -profileName = Oracle10g_10_1_0_4 -profileDescription = Oracle10g (10.1.0.4) Thin JDBC Profile for Testing -userName = -userPassword = -# set path to Oracle driver here (example: databasedriverJarList = c:/oracle/jdbc/lib/ojdbc14.jar ) -databasedriverJarList = -databaseName = -# set database URL here (example: databaseUrl = jdbc:oracle:thin:@localhost:1521:testdb ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10gXE.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10gXE.properties deleted file mode 100644 index 8d72946e2a..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle10gXE.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - jar list separate by comma (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver: oracle.jdbc.OracleDriver -# -profileName = oracleXE10g -profileDescription = Oracle10g XE Release 2 (10.2) Thin JDBC Profile for Testing -userName = scott -userPassword = tiger -# set path to Oracle driver here (example: databasedriverJarList = c:/oracle/jdbc/lib/ojdbc14.jar ) -databasedriverJarList = -databaseName = XE -# set database URL here (example: databaseUrl = jdbc:oracle:thin:@localhost:1521:XE ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle9i.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/oracle9i.properties deleted file mode 100644 index 8357e15c58..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/oracle9i.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - jar list separate by comma (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver: oracle.jdbc.OracleDriver -# -profileName = oracle9i -profileDescription = Oracle Thin JDBC Profile for Testing -userName = -userPassword = -# set path to Oracle driver here (example: databasedriverJarList = c:/oracle/jdbc/lib/ojdbc14.jar ) -databasedriverJarList = -databaseName = testdb -# set database URL here (example: databaseUrl = jdbc:oracle:thin:@server:1521:testdb ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/postgresql824.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/postgresql824.properties deleted file mode 100644 index f529359523..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/postgresql824.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver class (postgresql-8.2-505.jdbc2.jar) - org.postgresql.Driver -# -profileName = postgresql -profileDescription = PostgreSQL 8.2.4 JDBC Profile for Testing -# set user name -userName = -userPassword = -# set path to Derby driver here (example: databasedriverJarList = c:/jlib/postgresql-8.2-505.jdbc2.jar) -databasedriverJarList = -databaseName = postgres -# set database URL here (example: databaseUrl = jdbc:postgresql:postgres ) -databaseUrl = jdbc:postgresql:postgres diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/sqlserver2005.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/sqlserver2005.properties deleted file mode 100644 index 8451351e83..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/sqlserver2005.properties +++ /dev/null @@ -1,30 +0,0 @@ -############################################################################### -# Copyright (c) 2007 Oracle. -# 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: -# Oracle - initial API and implementation -############################################################################### -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# -profileName = sqlserver2005 -profileDescription = MS SQL Server 2005 JDBC Profile for Testing -# set user name -userName = -userPassword = -# set path to Derby driver here (example: databasedriverJarList = c:/sqlserver/lib/sqljdbc.jar ) -databasedriverJarList = -databaseName = testdb -# set database URL here (example: databaseUrl = jdbc:sqlserver://localhost:1433;databaseName=testdb ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/config/sybase12.properties b/jpa/tests/org.eclipse.jpt.db.tests/config/sybase12.properties deleted file mode 100644 index 34aab2556b..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/config/sybase12.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Platform Property names & Default -# -# profileName - jpatest -# profileDescription - JDBC Profile for JPA Testing -# userName - jpatest -# userPassword - (empty) -# databasedriverJarList - (mandatory) -# databaseName - testdb -# databaseUrl - (mandatory) -# Driver class (jconn3.jar) - com.sybase.jdbc3.jdbc.SybDriver -# -profileName = jconnect6 -profileDescription = Sybase 12.x jConnect JDBC Profile for Testing -# set user name -userName = -userPassword = -# set path to Derby driver here (example: databasedriverJarList = c:/sybase/lib/jconn3.jar ) -databasedriverJarList = -databaseName = testdb -# set database URL here (example: databaseUrl = jdbc:sybase:Tds:localhost:5000/testdb ) -databaseUrl = diff --git a/jpa/tests/org.eclipse.jpt.db.tests/plugin.properties b/jpa/tests/org.eclipse.jpt.db.tests/plugin.properties deleted file mode 100644 index b04fe27976..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/plugin.properties +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################### -# Copyright (c) 2007 Oracle. -# 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: -# Oracle - initial API and implementation -############################################################################### -# ==================================================================== -# To code developer: -# Do NOT change the properties between this line and the -# "%%% END OF TRANSLATED PROPERTIES %%%" line. -# Make a new property name, append to the end of the file and change -# the code to use the new property. -# ==================================================================== - -# ==================================================================== -# %%% END OF TRANSLATED PROPERTIES %%% -# ==================================================================== - -pluginName = JPA DB Tests -providerName = Eclipse.org - diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTests.java deleted file mode 100644 index ecb2b84188..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTests.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2007 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal; - -import org.eclipse.jpt.db.tests.internal.platforms.AllPlatformTests; - -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.swingui.TestRunner; - -/** - * JptDbTests - */ -public class JptDbTests { - - public static void main( String[] args) { - TestRunner.main( new String[] { "-c", JptDbTests.class.getName()}); - } - - public static Test suite() { - TestSuite suite = new TestSuite(JptDbTests.class.getPackage().getName()); - - suite.addTest( AllPlatformTests.suite()); - - return suite; - } - - private JptDbTests() { - super(); - throw new UnsupportedOperationException(); - } -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTestsPlugin.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTestsPlugin.java deleted file mode 100644 index a5fe382da0..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/JptDbTestsPlugin.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * JptDbTestsPlugin - */ -public class JptDbTestsPlugin extends Plugin { - - // The shared instance - private static JptDbTestsPlugin plugin; - - public static final String BUNDLE_ID = "org.eclipse.jpt.db.tests"; //$NON-NLS-1$ - - /** - * Returns the shared instance - */ - public static JptDbTestsPlugin getDefault() { - return plugin; - } - - /** - * The constructor - */ - public JptDbTestsPlugin() { - super(); - plugin = this; - } - - /** - * This method is called upon plug-in activation - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - } - - /** - * This method is called when the plug-in is stopped - */ - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/AllPlatformTests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/AllPlatformTests.java deleted file mode 100644 index c11b296e3f..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/AllPlatformTests.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2007 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * AllPlatformTests - */ -public class AllPlatformTests { - - public static Test suite() { - TestSuite suite = new TestSuite(AllPlatformTests.class.getPackage().getName()); - -// TODO - Uncomment the platform to test. -// suite.addTestSuite(Derby101Tests.class); -// suite.addTestSuite(Oracle9iTests.class); -// suite.addTestSuite(Oracle10gTests.class); -// suite.addTestSuite(Oracle10gXETests.class); -// suite.addTestSuite(SQLServer2005Tests.class); -// suite.addTestSuite(MySQL41Tests.class); -// suite.addTestSuite(PostgreSQL824Tests.class); -// suite.addTestSuite(Sybase12Tests.class); - - return suite; - } - - private AllPlatformTests() { - super(); - throw new UnsupportedOperationException(); - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/DTPPlatformTests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/DTPPlatformTests.java deleted file mode 100644 index 8c0424d97d..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/DTPPlatformTests.java +++ /dev/null @@ -1,414 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collection; -import java.util.NoSuchElementException; -import java.util.Properties; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.datatools.connectivity.ConnectionProfileException; -import org.eclipse.datatools.connectivity.IConnectionProfile; -import org.eclipse.datatools.connectivity.ProfileManager; -import org.eclipse.datatools.connectivity.drivers.IDriverMgmtConstants; -import org.eclipse.datatools.connectivity.drivers.IPropertySet; -import org.eclipse.datatools.connectivity.drivers.PropertySetImpl; -import org.eclipse.datatools.connectivity.drivers.XMLFileManager; -import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants; -import org.eclipse.datatools.connectivity.internal.ConnectivityPlugin; -import org.eclipse.jpt.db.ConnectionProfile; -import org.eclipse.jpt.db.ConnectionProfileRepository; -import org.eclipse.jpt.db.Database; -import org.eclipse.jpt.db.JptDbPlugin; -import org.eclipse.jpt.db.Schema; -import org.eclipse.jpt.db.Table; -import org.eclipse.jpt.db.tests.internal.JptDbTestsPlugin; -import org.eclipse.jpt.utility.internal.CollectionTools; -import org.eclipse.jpt.utility.internal.StringTools; - -import junit.framework.Assert; -import junit.framework.TestCase; - -/** - * Base class for all supported DTP platform. - */ -public abstract class DTPPlatformTests extends TestCase { - - protected ConnectionProfileRepository connectionRepository; - - private Properties platformProperties; - private String currentDbVendor; - private String currentDbVersion; - - private static final String PLATFORM_CONFIG_DIRECTORY = "config"; //$NON-NLS-1$ - - private static final String PROFILE_NAME_PROPERTY = "profileName"; //$NON-NLS-1$ - private static final String PROFILE_DESCRIPTION_PROPERTY = "profileDescription"; //$NON-NLS-1$ - private static final String USER_NAME_PROPERTY = "userName"; //$NON-NLS-1$ - private static final String USER_PASSWORD_PROPERTY = "userPassword"; //$NON-NLS-1$ - private static final String DB_DRIVER_JAR_PROPERTY = "databasedriverJarList"; //$NON-NLS-1$ - private static final String DB_NAME_PROPERTY = "databaseName"; //$NON-NLS-1$ - private static final String DB_URL_PROPERTY = "databaseUrl"; //$NON-NLS-1$ - - private static final String PROFILE_NAME_DEFAULT = "jpatest"; //$NON-NLS-1$ - private static final String PROFILE_DESCRIPTION_DEFAULT = "JDBC Profile for JPA Testing"; //$NON-NLS-1$ - private static final String USER_NAME_DEFAULT = "userName"; //$NON-NLS-1$ - private static final String USER_PASSWORD_DEFAULT = ""; //$NON-NLS-1$ - private static final String DB_NAME_DEFAULT = "testdb"; //$NON-NLS-1$ - - private static final String MISSING_PROPERTY_MESSAGE = "Enter missing property in platform config file (config/database.properties)"; - - public DTPPlatformTests( String name) { - super( name); - - this.connectionRepository = JptDbPlugin.instance().getConnectionProfileRepository(); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - - if( this.platformIsNew()) { - this.loadPlatformProperties(); - - this.buildDriverDefinitionFile( IDriverMgmtConstants.DRIVER_FILE); - this.buildConnectionProfile( this.profileName()); - this.currentDbVendor = this.databaseVendor(); - this.currentDbVersion = this.databaseVersion(); - } - this.verifyProfileNamed( this.profileName()); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - - - // ********** tests ********** - - public void testConnection() throws Exception { - - this.connect(); - - this.verifyDatabaseVersionNumber(); - this.verifyDatabaseContent(); - - this.disconnect(); - } - - public void testGetProfiles() { - // Getting the profile directly from DTP ProfileManager - IConnectionProfile[] profiles = ProfileManager.getInstance().getProfiles(); - Assert.assertNotNull( profiles); - Assert.assertTrue( profiles.length > 0); - } - - public void testGetProfilesByProvider() { - // Get Profiles By ProviderID - IConnectionProfile[] profiles = ProfileManager.getInstance().getProfileByProviderID( this.getProfile().getProviderID()); - Assert.assertNotNull( profiles); - Assert.assertTrue( profiles.length > 0); - } - - public void testGetProfileByName() { - // Get Profile By Name - IConnectionProfile dtpProfile = this.getDTPProfile(); - Assert.assertNotNull( dtpProfile); - Assert.assertTrue( dtpProfile.getName().equals( this.profileName())); - } - - public void testGetProfileByInstanceId() { - // Get Profile By InstanceID - IConnectionProfile dtpProfile = ProfileManager.getInstance().getProfileByInstanceID( this.getProfile().getInstanceID()); - Assert.assertNotNull( dtpProfile); - Assert.assertTrue( dtpProfile.getName().equals( this.profileName())); - } - - public void testWorkingOffline() { - - if( this.getProfile().supportsWorkOfflineMode()) { - - if( ! this.getProfile().canWorkOffline()) { - this.connect(); - this.saveWorkOfflineData(); - this.disconnect(); - - Assert.assertTrue( this.getProfile().canWorkOffline()); - } - this.workOffline(); - - Assert.assertTrue( this.getProfile().isActive()); - Assert.assertTrue( this.getProfile().isWorkingOffline()); - - this.disconnect(); - } - } - - // ********** internal tests ********** - - private void verifyDatabaseVersionNumber() { - Database database = this.getProfile().getDatabase(); - Assert.assertNotNull( database); - - String actualVersionNumber = database.getVersion(); - String expectedVersionNumber = this.databaseVersion(); - String errorMessage = "Expected version number: " + expectedVersionNumber + " but the actual version number was: " + actualVersionNumber; - assertTrue( errorMessage, actualVersionNumber.indexOf( expectedVersionNumber) != -1); - - String actualVendor = database.getVendor(); - String expectedVendor = this.databaseVendor(); - errorMessage = "Expected vendor: " + expectedVendor + " but the actual vendor was: " + actualVendor; - assertEquals( errorMessage, actualVendor, expectedVendor); - } - - private void verifyDatabaseContent() { - Database database = this.getProfile().getDatabase(); - Assert.assertTrue( database.schemataSize() > 0); - - Schema schema = database.schemaNamed( this.getProfile().getUserName()); - if( schema != null) { - Assert.assertTrue( schema.sequencesSize() >= 0); - - Object[] tableNames = CollectionTools.array( schema.tableNames()); - if( tableNames.length >= 1) { - Table table = schema.tableNamed(( String)tableNames[ 0]); - Assert.assertTrue( table.columnsSize() >= 0); - Assert.assertTrue( table.foreignKeysSize() >= 0); - Assert.assertTrue( table.primaryKeyColumnsSize() >= 0); - } - } - } - - private void verifyProfileNamed( String profileName) { - - ConnectionProfile profile = this.getProfileNamed( profileName); - Assert.assertTrue( "ConnectionProfile not found", profileName.equals( profile.getName())); - } - - // ***** Platform specific behavior ***** - - protected abstract String databaseVendor(); - protected abstract String databaseVersion(); - - protected abstract String driverName(); - protected abstract String driverDefinitionType(); - protected abstract String driverDefinitionId(); - protected abstract String driverClass(); - - protected abstract String getConfigName(); - - // ***** Behavior ***** - - protected void connect() { - - this.getProfile().connect(); - Assert.assertTrue( "Could not connect.", this.getProfile().isActive()); - Assert.assertFalse( "Connection corrupted.", this.getProfile().isWorkingOffline()); - } - - protected void disconnect() { - - this.getProfile().disconnect(); - Assert.assertFalse( "Disconnect failed.", this.getProfile().isActive()); - } - - private void workOffline() { - IStatus status = this.getProfile().workOffline(); - - Assert.assertTrue( "Could not work offline.", status.isOK()); - } - - private void saveWorkOfflineData() { - IStatus status = this.getProfile().saveWorkOfflineData(); - - Assert.assertTrue( "Could not save offline data.", status.isOK()); - } - - // ********** queries ********** - - protected Schema getSchemaNamed( String schemaName) { - - return this.getProfile().getDatabase().schemaNamed( schemaName); - } - - protected Collection<Table> getTables() { - - Schema schema = this.getSchemaNamed( this.getProfile().getUserName()); - if( schema == null) { - return new ArrayList<Table>(); - } - return CollectionTools.collection( schema.tables()); - } - - protected Table getTableNamed( String tableName) { - - Schema schema = this.getSchemaNamed( this.getProfile().getUserName()); - Assert.assertNotNull( schema); - - return schema.tableNamed( tableName); - } - - protected String providerId() { - return ConnectionProfile.CONNECTION_PROFILE_TYPE; - } - - protected String passwordIsSaved() { - return "true"; - } - - - protected IConnectionProfile getDTPProfile() { - return ProfileManager.getInstance().getProfileByName( this.profileName()); - } - - protected String profileName() { - return this.platformProperties.getProperty( PROFILE_NAME_PROPERTY, PROFILE_NAME_DEFAULT); - } - - protected String profileDescription() { - return this.platformProperties.getProperty( PROFILE_DESCRIPTION_PROPERTY, PROFILE_DESCRIPTION_DEFAULT); - } - - protected String userName() { - return this.platformProperties.getProperty( USER_NAME_PROPERTY, USER_NAME_DEFAULT); - } - - protected String userPassword() { - return this.platformProperties.getProperty( USER_PASSWORD_PROPERTY, USER_PASSWORD_DEFAULT); - } - - protected String databaseName() { - return this.platformProperties.getProperty( DB_NAME_PROPERTY, DB_NAME_DEFAULT); - } - - protected String databasedriverJarList() { - String dbDriverJarList = this.platformProperties.getProperty( DB_DRIVER_JAR_PROPERTY); - if ( StringTools.stringIsEmpty( dbDriverJarList)) { - throw new NoSuchElementException( MISSING_PROPERTY_MESSAGE); - } - return dbDriverJarList; - } - - protected String databaseUrl() { - String dbUrl = this.platformProperties.getProperty( DB_URL_PROPERTY); - if ( StringTools.stringIsEmpty( dbUrl)) { - throw new NoSuchElementException( MISSING_PROPERTY_MESSAGE); - } - return dbUrl; - } - - protected ConnectionProfile getProfile() { - - return this.getProfileNamed( this.profileName()); - } - - protected ConnectionProfile getProfileNamed( String profileName) { - - return this.connectionRepository.connectionProfileNamed( profileName); - } - - private String getTestPluginBundleId() { - return JptDbTestsPlugin.BUNDLE_ID; - } - - private IPath getDriverDefinitionLocation() { - return ConnectivityPlugin.getDefault().getStateLocation(); - } - - private String getConfigPath() { - return this.getConfigDir() + "/" + this.getConfigName(); - } - - private String getConfigDir() { - return PLATFORM_CONFIG_DIRECTORY; - } - - private boolean platformIsNew() { - return( !this.databaseVendor().equals( this.currentDbVendor) || this.databaseVersion().equals( this.currentDbVersion)); - } - - private void loadPlatformProperties() throws IOException { - - if( this.platformProperties == null) { - URL configUrl = Platform.getBundle( this.getTestPluginBundleId()).getEntry( this.getConfigPath()); - - this.platformProperties = new Properties(); - this.platformProperties.load( configUrl.openStream()); - } - } - - private Properties buildDriverProperties() { - Properties driverProperties = new Properties(); - driverProperties.setProperty( ConnectionProfile.DRIVER_DEFINITION_TYPE_PROP_ID, this.driverDefinitionType()); - driverProperties.setProperty( ConnectionProfile.DRIVER_JAR_LIST_PROP_ID, this.databasedriverJarList()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.USERNAME_PROP_ID, this.userName()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, this.driverClass()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID, this.databaseName()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.PASSWORD_PROP_ID, this.userPassword()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.URL_PROP_ID, this.databaseUrl()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, this.databaseVendor()); - driverProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, this.databaseVersion()); - return driverProperties; - } - - private Properties buildBasicProperties() { - Properties basicProperties = new Properties(); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID, this.databaseName()); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.USERNAME_PROP_ID, this.userName()); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.PASSWORD_PROP_ID, this.userPassword()); - basicProperties.setProperty( ConnectionProfile.DRIVER_DEFINITION_PROP_ID, this.driverDefinitionId()); - - basicProperties.setProperty( IJDBCDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, this.driverClass()); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.URL_PROP_ID, this.databaseUrl()); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, this.databaseVendor()); - basicProperties.setProperty( IJDBCDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, this.databaseVersion()); - - basicProperties.setProperty( ConnectionProfile.DATABASE_SAVE_PWD_PROP_ID, this.passwordIsSaved()); - return basicProperties; - } - - private void buildConnectionProfile( String profileName) throws ConnectionProfileException { - - ProfileManager profileManager = ProfileManager.getInstance(); - Assert.assertNotNull( profileManager); - - IConnectionProfile dtpProfile = this.getDTPProfile(); - if( dtpProfile == null) { - Properties basicProperties = buildBasicProperties(); - ProfileManager.getInstance().createProfile( profileName, this.profileDescription(), this.providerId(), basicProperties); - } - } - - private void buildDriverDefinitionFile( String driverFileName) throws CoreException { - - XMLFileManager.setStorageLocation( this.getDriverDefinitionLocation()); - XMLFileManager.setFileName( driverFileName); - IPropertySet[] propsets = new IPropertySet[ 1]; - String driverName = this.driverName(); - String driverId = this.driverDefinitionId(); - PropertySetImpl propertySet = new PropertySetImpl( driverName, driverId); - propertySet.setProperties( driverId, this.buildDriverProperties()); - propsets[ 0] = propertySet; - - XMLFileManager.saveNamedPropertySet( propsets); - - File driverDefinitioneFile = this.getDriverDefinitionLocation().append( driverFileName).toFile(); - Assert.assertTrue( driverDefinitioneFile.exists()); - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Derby101Tests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Derby101Tests.java deleted file mode 100644 index 2244b0e623..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Derby101Tests.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Derby 10.1 Embedded Driver Test - */ -public class Derby101Tests extends DTPPlatformTests { - - public Derby101Tests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "Derby"; - } - - @Override - protected String databaseVersion() { - return "10.1"; - } - - @Override - protected String providerId() { - return "org.eclipse.datatools.connectivity.db.derby.embedded.connectionProfile"; - } - - @Override - protected String driverName() { - return "Derby Embedded JDBC Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.connectivity.db.derby101.genericDriverTemplate"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Derby Embedded JDBC Driver"; - } - - @Override - protected String driverClass() { - return "org.apache.derby.jdbc.EmbeddedDriver"; - } - - @Override - protected String getConfigName() { - return "derby101.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/MySQL41Tests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/MySQL41Tests.java deleted file mode 100644 index 37c190f113..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/MySQL41Tests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * SQL Server 2005 Driver Test - */ -public class MySQL41Tests extends DTPPlatformTests { - - public MySQL41Tests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "MySql"; - } - - @Override - protected String databaseVersion() { - return "4.1"; - } - - @Override - protected String driverClass() { - return "com.mysql.jdbc.Driver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.MySQL JDBC Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.mysql.4_1.driverTemplate"; - } - - @Override - protected String driverName() { - return "MySQL JDBC Driver"; - } - - @Override - protected String getConfigName() { - return "mysql41.properties"; - } - -}
\ No newline at end of file diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gTests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gTests.java deleted file mode 100644 index 4fa85b4db8..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gTests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Oracle 10g Thin Driver Test - */ -public class Oracle10gTests extends DTPPlatformTests { - - public Oracle10gTests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "Oracle"; - } - - @Override - protected String databaseVersion() { - return "10"; - } - - @Override - protected String driverClass() { - return "oracle.jdbc.OracleDriver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Oracle Thin Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.oracle.10.driverTemplate"; - } - - @Override - protected String driverName() { - return "Oracle 10g Thin Driver"; - } - - @Override - protected String getConfigName() { - return "oracle10g.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gXETests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gXETests.java deleted file mode 100644 index 78e0548b1b..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle10gXETests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Oracle 10g Thin Driver Test - */ -public class Oracle10gXETests extends DTPPlatformTests { - - public Oracle10gXETests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "Oracle"; - } - - @Override - protected String databaseVersion() { - return "10"; - } - - @Override - protected String driverClass() { - return "oracle.jdbc.OracleDriver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Oracle Thin Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.oracle.10.driverTemplate"; - } - - @Override - protected String driverName() { - return "Oracle 10g Thin Driver"; - } - - @Override - protected String getConfigName() { - return "oracle10gXE.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle9iTests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle9iTests.java deleted file mode 100644 index 8e1795dc24..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Oracle9iTests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Oracle 9i Thin Driver Test - */ -public class Oracle9iTests extends DTPPlatformTests { - - public Oracle9iTests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "Oracle"; - } - - @Override - protected String databaseVersion() { - return "9"; - } - - @Override - protected String driverClass() { - return "oracle.jdbc.OracleDriver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Oracle Thin Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.oracle.9.driverTemplate"; - } - - @Override - protected String driverName() { - return "Oracle 9i Thin Driver"; - } - - @Override - protected String getConfigName() { - return "oracle9i.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/PostgreSQL824Tests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/PostgreSQL824Tests.java deleted file mode 100644 index 8e011ad987..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/PostgreSQL824Tests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Oracle 10g Thin Driver Test - */ -public class PostgreSQL824Tests extends DTPPlatformTests { - - public PostgreSQL824Tests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "postgres"; - } - - @Override - protected String databaseVersion() { - return "8.x"; - } - - @Override - protected String driverClass() { - return "org.postgresql.Driver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.PostgreSQL JDBC Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.postgresql.postgresqlDriverTemplate"; - } - - @Override - protected String driverName() { - return "PostgreSQL JDBC Driver"; - } - - @Override - protected String getConfigName() { - return "postgresql824.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/SQLServer2005Tests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/SQLServer2005Tests.java deleted file mode 100644 index 350d844d56..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/SQLServer2005Tests.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * SQL Server 2005 Driver Test - */ -public class SQLServer2005Tests extends DTPPlatformTests { - - public SQLServer2005Tests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "SQLServer"; - } - - @Override - protected String databaseVersion() { - return "2005"; - } - - @Override - protected String providerId() { - return "org.eclipse.datatools.connectivity.db.generic.connectionProfile"; - } - - @Override - protected String driverName() { - return "Microsoft SQL Server 2005 JDBC Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.msft.sqlserver.2005.driverTemplate"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Microsoft SQL Server 2005 JDBC Driver"; - } - - @Override - protected String driverClass() { - return "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - } - - @Override - protected String getConfigName() { - return "sqlserver2005.properties"; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Sybase12Tests.java b/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Sybase12Tests.java deleted file mode 100644 index c6c7eb3e89..0000000000 --- a/jpa/tests/org.eclipse.jpt.db.tests/src/org/eclipse/jpt/db/tests/internal/platforms/Sybase12Tests.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. 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: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.db.tests.internal.platforms; - - -/** - * Oracle 10g Thin Driver Test - */ -public class Sybase12Tests extends DTPPlatformTests { - - public Sybase12Tests( String name) { - super( name); - } - - @Override - protected String databaseVendor() { - return "Sybase"; - } - - @Override - protected String databaseVersion() { - return "12.x"; - } - - @Override - protected String driverClass() { - return "com.sybase.jdbc3.jdbc.SybDriver"; - } - - @Override - protected String driverDefinitionId() { - return "DriverDefn.Sybase JDBC Driver"; - } - - @Override - protected String driverDefinitionType() { - return "org.eclipse.datatools.enablement.sybase.ase.12_x.driverTemplate"; - } - - @Override - protected String driverName() { - return "Sybase JDBC Driver"; - } - - @Override - protected String getConfigName() { - return "sybase12.properties"; - } - -} |