summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-08-23 08:11:14 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-08-23 08:11:14 +0000
commit9a32e217f2cb89887b2a46934b992ff32e880ba1 (patch)
treed0a461e727731441c402ebd07fc1d56bf4a40e01 /tests
parent293fbfe181be5a388f9c0512d0e62a3594f55161 (diff)
downloadvaadin-framework-9a32e217f2cb89887b2a46934b992ff32e880ba1.tar.gz
vaadin-framework-9a32e217f2cb89887b2a46934b992ff32e880ba1.zip
Revert 24221 for now, the test does not work reliably
svn changeset:24223/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r--tests/server-side/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java83
1 files changed, 0 insertions, 83 deletions
diff --git a/tests/server-side/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java b/tests/server-side/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
index b8df4b1799..e62a06e6e1 100644
--- a/tests/server-side/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
+++ b/tests/server-side/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
@@ -5,7 +5,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.easymock.EasyMock;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -15,9 +14,7 @@ import com.vaadin.data.Container.Filter;
import com.vaadin.data.util.filter.Like;
import com.vaadin.data.util.filter.Or;
import com.vaadin.data.util.sqlcontainer.AllTests;
-import com.vaadin.data.util.sqlcontainer.ColumnProperty;
import com.vaadin.data.util.sqlcontainer.DataGenerator;
-import com.vaadin.data.util.sqlcontainer.RowId;
import com.vaadin.data.util.sqlcontainer.RowItem;
import com.vaadin.data.util.sqlcontainer.SQLContainer;
import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
@@ -151,86 +148,6 @@ public class SQLGeneratorsTest {
}
@Test
- public void generateUpdateQuery_severalPrimKeys_shouldSucceed()
- throws SQLException {
- /*
- * No need to run this for Oracle/MSSQL generators since the
- * DefaultSQLGenerator method would be called anyway.
- */
- if (AllTests.sqlGen instanceof MSSQLGenerator
- || AllTests.sqlGen instanceof OracleGenerator) {
- return;
- }
-
- DefaultSQLGenerator sqlGen = new DefaultSQLGenerator();
-
- // Create situation wihere PrimKey is a composite of two columns...
- ColumnProperty cp1 = new ColumnProperty("FIRSTPK", false, true, false,
- true, new Integer(1), Integer.class);
- ColumnProperty cp2 = new ColumnProperty("SECONDPK", false, true, false,
- true, "primKeyValue", String.class);
- ColumnProperty cp3 = new ColumnProperty("NONPK", false, true, false,
- false, new Integer(1), Integer.class);
-
- SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
-
- RowItem ri = new RowItem(container, new RowId(new Object[] { 0L }),
- Arrays.asList(cp1, cp2, cp3));
-
- StatementHelper generateUpdateQuery = sqlGen.generateUpdateQuery(
- "testTable", ri);
-
- String queryString = generateUpdateQuery.getQueryString();
-
- // Assert that the WHERE-clause has both prim keys...
- Assert.assertEquals(
- "UPDATE testTable SET \"NONPK\" = ?, \"SECONDPK\" = ?, \"FIRSTPK\" = ? WHERE \"SECONDPK\" = ? AND \"FIRSTPK\" = ?",
- queryString);
- }
-
- @Test
- public void generateUpdateQuery_severalPrimKeysAndVersion_shouldSucceed()
- throws SQLException {
- /*
- * No need to run this for Oracle/MSSQL generators since the
- * DefaultSQLGenerator method would be called anyway.
- */
- if (AllTests.sqlGen instanceof MSSQLGenerator
- || AllTests.sqlGen instanceof OracleGenerator) {
- return;
- }
-
- DefaultSQLGenerator sqlGen = new DefaultSQLGenerator();
-
- // Create situation wihere PrimKey is a composite of two columns...
- ColumnProperty cp1 = new ColumnProperty("FIRSTPK", false, true, false,
- true, new Integer(1), Integer.class);
- ColumnProperty cp2 = new ColumnProperty("SECONDPK", false, true, false,
- true, "primKeyValue", String.class);
- ColumnProperty cp3 = new ColumnProperty("NONPK", false, true, false,
- false, new Integer(1), Integer.class);
- ColumnProperty cp4 = new ColumnProperty("VERSION", false, true, false,
- false, new Integer(1), Integer.class);
- cp4.setVersionColumn(true);
-
- SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
-
- RowItem ri = new RowItem(container, new RowId(new Object[] { 0L }),
- Arrays.asList(cp1, cp2, cp3, cp4));
-
- StatementHelper generateUpdateQuery = sqlGen.generateUpdateQuery(
- "testTable", ri);
-
- String queryString = generateUpdateQuery.getQueryString();
-
- // Assert that the WHERE-clause has both prim keys and version...
- // Version should not be in SET...
- Assert.assertEquals(
- "UPDATE testTable SET \"NONPK\" = ?, \"SECONDPK\" = ?, \"FIRSTPK\" = ? WHERE \"VERSION\" = ? AND \"SECONDPK\" = ? AND \"FIRSTPK\" = ?",
- queryString);
- }
-
- @Test
public void generateInsertQuery_basicQuery_shouldSucceed()
throws SQLException {
/*