Revision: 6396
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6396&view=rev
Author: manningr
Date: 2011-09-05 23:17:34 +0000 (Mon, 05 Sep 2011)
Log Message:
-----------
New external tests for various plugin-supplied details/source TABs. These just test that SQL can executed without exception. They require the external test aliases setup in SQuirreL to work properly.
Modified Paths:
--------------
trunk/sql12/squirrelsql-integration-environment/pom.xml
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AliasNames.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ProcedureSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ViewSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/ViewSourceTabTest.java
Added Paths:
-----------
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseObjectTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBasePreparedStatementTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractFormattedSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/IndexDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ProcedureSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/SequenceDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ViewSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/SequenceDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/IndexDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/ProcedureSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/SequenceDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/TriggerSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/ViewSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mssql/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mssql/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mssql/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mssql/tab/ViewSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/DatabaseStatusTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/OpenTablesTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ProcedureSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ProcessesTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowColumnsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowIndexesTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowLogsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowMasterLogsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowMasterStatusTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowSlaveStatusTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ShowVariablesTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/TableStatusTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/TriggerSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/UserGrantsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/mysql/tab/ViewSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/ConstraintColumnInfoTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/ConstraintDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/ConstraintSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/IndexColumnInfoTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/tab/IndexDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/DomainDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/GeneratorDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/ProcedureSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/TriggerDetailsTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/TriggerSourceTabExternalTest.java
trunk/sql12/squirrelsql-integration-environment/src/test/java/org/firebirdsql/squirrel/tab/ViewSourceTabExternalTest.java
Modified: trunk/sql12/squirrelsql-integration-environment/pom.xml
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/pom.xml 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/pom.xml 2011-09-05 23:17:34 UTC (rev 6396)
@@ -163,8 +163,36 @@
<version>${squirrel-sql-version}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>net.sf.squirrel-sql.plugins</groupId>
+ <artifactId>h2</artifactId>
+ <version>${squirrel-sql-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.squirrel-sql.plugins</groupId>
+ <artifactId>mysql</artifactId>
+ <version>${squirrel-sql-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.squirrel-sql.plugins</groupId>
+ <artifactId>mssql</artifactId>
+ <version>${squirrel-sql-version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
+ <groupId>net.sf.squirrel-sql.plugins</groupId>
+ <artifactId>oracle</artifactId>
+ <version>${squirrel-sql-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>net.sf.dbmonster</groupId>
<artifactId>dbmonster-core</artifactId>
<version>1.0.5-SNAPSHOT</version>
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseObjectTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseObjectTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseObjectTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs;
+
+import java.lang.reflect.Method;
+import java.sql.Connection;
+
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo;
+import net.sourceforge.squirrel_sql.plugins.dbcopy.cli.SessionUtil;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public abstract class AbstractBaseObjectTabExternalTest
+{
+
+ protected BaseObjectTab classUnderTest = null;
+ protected SessionUtil sessionUtil = new SessionUtil();
+ protected IDatabaseObjectInfo dboi = null;
+ protected Connection con = null;
+
+ protected abstract String getSimpleName();
+
+ protected abstract BaseObjectTab getTabToTest();
+
+ protected abstract String getAlias();
+
+ protected String getSchemaName() {
+ return "testSchema";
+ }
+
+ @Before
+ public void setup() throws Exception
+ {
+ classUnderTest = getTabToTest();
+ ISession session = sessionUtil.getSessionForAlias(getAlias());
+ if (dboi == null) {
+ dboi = Mockito.mock(IDatabaseObjectInfo.class);
+ Mockito.when(dboi.getSchemaName()).thenReturn(getSchemaName());
+ Mockito.when(dboi.getSimpleName()).thenReturn(getSimpleName());
+ Mockito.when(dboi.getQualifiedName()).thenReturn(getSchemaName() + "." + getSimpleName());
+ }
+ con = session.getSQLConnection().getConnection();
+ classUnderTest.setSession(session);
+ classUnderTest.setDatabaseObjectInfo(dboi);
+ }
+
+ @Test
+ public void testGetSqlStatement() throws Exception
+ {
+ Method m = classUnderTest.getClass().getDeclaredMethod("getSQL", (Class<?>[])null);
+ m.setAccessible(true);
+ Object result = m.invoke(classUnderTest, (Object[])null);
+ con.createStatement().executeQuery((String)result);
+ }
+
+
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBasePreparedStatementTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBasePreparedStatementTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBasePreparedStatementTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs;
+
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo;
+import net.sourceforge.squirrel_sql.fw.sql.SQLUtilities;
+import net.sourceforge.squirrel_sql.plugins.dbcopy.cli.SessionUtil;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public abstract class AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected BasePreparedStatementTab classUnderTest = null;
+ protected SessionUtil sessionUtil = new SessionUtil();
+ protected IDatabaseObjectInfo dboi = null;
+ protected Connection con = null;
+
+ protected abstract String getSimpleName();
+
+ protected abstract BasePreparedStatementTab getTabToTest();
+
+ protected abstract String getAlias();
+
+ protected List<String> getSetupStatements() {
+ return new ArrayList<String>();
+ }
+
+ protected List<String> getTeardownStatements() {
+ return new ArrayList<String>();
+ }
+
+ protected String getSchemaName() {
+ return null;
+ }
+
+ @Before
+ public void setup() throws Exception
+ {
+ classUnderTest = getTabToTest();
+ ISession session = sessionUtil.getSessionForAlias(getAlias());
+ con = session.getSQLConnection().getConnection();
+ if (dboi == null) {
+ dboi = Mockito.mock(IDatabaseObjectInfo.class);
+ Mockito.when(dboi.getSchemaName()).thenReturn(getSchemaName());
+ Mockito.when(dboi.getSimpleName()).thenReturn(getSimpleName());
+ }
+ classUnderTest.setSession(session);
+ classUnderTest.setDatabaseObjectInfo(dboi);
+ executeStatements(getSetupStatements());
+ }
+
+ @After
+ public void tearDown() throws Exception
+ {
+ executeStatements(getTeardownStatements());
+ }
+
+ @Test
+ public void testCreateStatement() throws Exception
+ {
+ Method m = classUnderTest.getClass().getDeclaredMethod("createStatement", (Class<?>[])null);
+ m.setAccessible(true);
+ Object result = m.invoke(classUnderTest, (Object[])null);
+ PreparedStatement stmt = (PreparedStatement)result;
+ stmt.executeQuery();
+ }
+
+ private void executeStatements(List<String> statements) throws Exception {
+
+ for (String sql : statements) {
+ Statement stmt = null;
+ try {
+ stmt = con.createStatement();
+ stmt.execute(sql);
+ } finally {
+ SQLUtilities.closeStatement(stmt);
+ }
+ }
+ }
+
+}
Modified: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseSourceTabExternalTest.java 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractBaseSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs;
import java.lang.reflect.Method;
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractFormattedSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractFormattedSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AbstractFormattedSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs;
+
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+import net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo;
+import net.sourceforge.squirrel_sql.plugins.dbcopy.cli.SessionUtil;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public abstract class AbstractFormattedSourceTabExternalTest
+{
+
+ protected BaseSourceTab classUnderTest = null;
+ protected SessionUtil sessionUtil = new SessionUtil();
+ protected IDatabaseObjectInfo dboi = null;
+ protected Connection con = null;
+
+ protected abstract String getSimpleName();
+
+ protected abstract BaseSourceTab getTabToTest();
+
+ protected abstract String getAlias();
+
+ protected String getSchemaName() {
+ return "testSchema";
+ }
+
+ @Before
+ public void setup() throws Exception
+ {
+ classUnderTest = getTabToTest();
+ ISession session = sessionUtil.getSessionForAlias(getAlias());
+ if (dboi == null) {
+ dboi = Mockito.mock(IDatabaseObjectInfo.class);
+ Mockito.when(dboi.getSchemaName()).thenReturn(getSchemaName());
+ Mockito.when(dboi.getSimpleName()).thenReturn(getSimpleName());
+ }
+ con = session.getSQLConnection().getConnection();
+ classUnderTest.setSession(session);
+ classUnderTest.setDatabaseObjectInfo(dboi);
+ }
+
+ @Test
+ public void testGetSqlStatement() throws Exception
+ {
+ Method m = classUnderTest.getClass().getDeclaredMethod("getSqlStatement", (Class<?>[])null);
+ m.setAccessible(true);
+ Object result = m.invoke(classUnderTest, (Object[])null);
+ PreparedStatement stmt = con.prepareStatement((String)result);
+ stmt.setString(1, getSchemaName());
+ stmt.setString(2, getSimpleName());
+ stmt.executeQuery();
+ }
+
+
+
+}
Modified: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AliasNames.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AliasNames.java 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/AliasNames.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs;
public interface AliasNames
@@ -24,6 +42,10 @@
String HSQLDB_DEST_ALIAS_NAME = "HSQLDB (dbcopydest)";
+ String MSSQL_SOURCE_ALIAS_NAME = "MS-SQL (dbcopysrc)";
+
+ String MSSQL_DEST_ALIAS_NAME = "MS-SQL (dbcopydest)";
+
String MYSQL4_DEST_ALIAS_NAME = "MySQL 4 (dbcopydest)";
String MYSQL4_SOURCE_ALIAS_NAME = "MySQL 4 (dbcopysrc)";
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/IndexDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/IndexDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/IndexDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class IndexDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testIndex";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new IndexDetailsTab(false);
+ }
+
+ protected String getAlias() {
+ return AliasNames.DB2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ProcedureSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ProcedureSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ProcedureSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBaseSourceTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+
+public class ProcedureSourceTabExternalTest extends AbstractBaseSourceTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testProcedure";
+ }
+
+ protected BaseSourceTab getTabToTest() {
+ return new MyStatementCreator();
+ }
+
+ protected String getAlias() {
+ return AliasNames.DERBY_DEST_ALIAS_NAME;
+ }
+
+ private class MyStatementCreator extends ProcedureSourceTab {
+ public MyStatementCreator()
+ {
+ super("",false,"");
+ }
+
+ @Override
+ public PreparedStatement createStatement() throws SQLException
+ {
+ return super.createStatement();
+ }
+
+ }
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/SequenceDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/SequenceDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/SequenceDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class SequenceDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testSequence";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new SequenceDetailsTab(false);
+ }
+
+ protected String getAlias() {
+ return AliasNames.DB2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class TriggerDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testTrigger";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new TriggerDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.DB2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/TriggerSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractFormattedSourceTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+
+
+public class TriggerSourceTabExternalTest extends AbstractFormattedSourceTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testTrigger";
+ }
+
+ protected BaseSourceTab getTabToTest() {
+ return new TriggerSourceTab("a hint", false, "");
+ }
+
+ protected String getAlias() {
+ return AliasNames.DB2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ViewSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ViewSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/tab/ViewSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.db2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractFormattedSourceTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+
+public class ViewSourceTabExternalTest extends AbstractFormattedSourceTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testView";
+ }
+
+ protected BaseSourceTab getTabToTest() {
+ return new ViewSourceTab("a hint", "", false);
+ }
+
+ protected String getAlias() {
+ return AliasNames.DB2_DEST_ALIAS_NAME;
+ }
+
+}
Modified: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ProcedureSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ProcedureSourceTabExternalTest.java 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ProcedureSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package net.sourceforge.squirrel_sql.plugins.derby.tab;
import java.sql.PreparedStatement;
@@ -11,7 +29,7 @@
{
protected String getSimpleName() {
- return "testView";
+ return "testProcedure";
}
protected BaseSourceTab getTabToTest() {
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.derby.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class TriggerDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testTrigger";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new TriggerDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.DERBY_DEST_ALIAS_NAME;
+ }
+
+}
Modified: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerSourceTabExternalTest.java 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/TriggerSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package net.sourceforge.squirrel_sql.plugins.derby.tab;
import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBaseSourceTabExternalTest;
Modified: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ViewSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ViewSourceTabExternalTest.java 2011-09-05 14:33:41 UTC (rev 6395)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/derby/tab/ViewSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package net.sourceforge.squirrel_sql.plugins.derby.tab;
import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBaseSourceTabExternalTest;
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.h2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class IndexDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testIndex";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new IndexDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.H2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/IndexSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.h2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractFormattedSourceTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+
+public class IndexSourceTabExternalTest extends AbstractFormattedSourceTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testIndex";
+ }
+
+ protected BaseSourceTab getTabToTest() {
+ return new IndexSourceTab("a hint", "");
+ }
+
+ protected String getAlias() {
+ return AliasNames.H2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/SequenceDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/SequenceDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/SequenceDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.h2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class SequenceDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testSequence";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new SequenceDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.H2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/TriggerDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/TriggerDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/h2/tab/TriggerDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.h2.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class TriggerDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testTrigger";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new TriggerDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.H2_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/IndexDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/IndexDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/IndexDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.informix.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public class IndexDetailsTabExternalTest extends AbstractBasePreparedStatementTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testIndex";
+ }
+
+ protected BasePreparedStatementTab getTabToTest() {
+ return new IndexDetailsTab();
+ }
+
+ protected String getAlias() {
+ return AliasNames.INFORMIX_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/ProcedureSourceTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/ProcedureSourceTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/ProcedureSourceTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.informix.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBaseSourceTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab;
+
+public class ProcedureSourceTabExternalTest extends AbstractBaseSourceTabExternalTest
+{
+
+ protected String getSimpleName() {
+ return "testProcedure";
+ }
+
+ protected BaseSourceTab getTabToTest() {
+ return new ProcedureSourceTab("a hint");
+ }
+
+ protected String getAlias() {
+ return AliasNames.INFORMIX_DEST_ALIAS_NAME;
+ }
+
+}
Added: trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/SequenceDetailsTabExternalTest.java
===================================================================
--- trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/SequenceDetailsTabExternalTest.java (rev 0)
+++ trunk/sql12/squirrelsql-integration-environment/src/test/java/net/sourceforge/squirrel_sql/plugins/informix/tab/SequenceDetailsTabExternalTest.java 2011-09-05 23:17:34 UTC (rev 6396)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package net.sourceforge.squirrel_sql.plugins.informix.tab;
+
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AbstractBasePreparedStatementTabExternalTest;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.AliasNames;
+import net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab;
+
+public ...
[truncated message content] |