diff options
author | Artur Signell <artur.signell@itmill.com> | 2012-08-03 13:54:23 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2012-08-03 13:54:23 +0000 |
commit | 00806654f5015e18c41ce1a8002f58d63a7d951c (patch) | |
tree | 33c7441df78c3321f8986d660a6e7b0ff0df86a8 /tests | |
parent | 197e7ce782968dfda2fd7849547ffdec59a387f5 (diff) | |
download | vaadin-framework-00806654f5015e18c41ce1a8002f58d63a7d951c.tar.gz vaadin-framework-00806654f5015e18c41ce1a8002f58d63a7d951c.zip |
Updated test to catch correct exception (#9147)
The test now fails before the query can be executed when the query string is generated.
svn changeset:24061/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server-side/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/server-side/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java b/tests/server-side/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java index 657f06ae5e..e135894013 100644 --- a/tests/server-side/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java +++ b/tests/server-side/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java @@ -18,15 +18,13 @@ import com.vaadin.data.Container.Filter; import com.vaadin.data.util.filter.Compare.Equal; import com.vaadin.data.util.filter.Like; import com.vaadin.data.util.sqlcontainer.AllTests; +import com.vaadin.data.util.sqlcontainer.AllTests.DB; import com.vaadin.data.util.sqlcontainer.DataGenerator; import com.vaadin.data.util.sqlcontainer.OptimisticLockException; import com.vaadin.data.util.sqlcontainer.RowItem; import com.vaadin.data.util.sqlcontainer.SQLContainer; -import com.vaadin.data.util.sqlcontainer.AllTests.DB; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; -import com.vaadin.data.util.sqlcontainer.query.OrderBy; -import com.vaadin.data.util.sqlcontainer.query.TableQuery; import com.vaadin.data.util.sqlcontainer.query.generator.DefaultSQLGenerator; public class TableQueryTest { @@ -281,7 +279,9 @@ public class TableQueryTest { AllTests.sqlGen); try { tQuery.containsRowWithKey(new Object[] { null }); - } catch (SQLException e) { + org.junit.Assert + .fail("null should throw an IllegalArgumentException from StatementHelper"); + } catch (IllegalArgumentException e) { // We should now be able to reserve two connections connectionPool.reserveConnection(); connectionPool.reserveConnection(); |