Clean up tests and add missing source header git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk@1674747 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/ecfbc081 Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/ecfbc081 Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/ecfbc081 Branch: refs/heads/master Commit: ecfbc081e124bced65359f675aa7d46cd2371edc Parents: 7bb4174 Author: Carl Franklin Hall <[email protected]> Authored: Mon Apr 20 06:32:40 2015 +0000 Committer: Carl Franklin Hall <[email protected]> Committed: Mon Apr 20 06:32:40 2015 +0000 ---------------------------------------------------------------------- .../dbutils/StatementConfigurationTest.java | 22 ++++++++++++++------ .../handlers/columns/ColumnHandlerTestBase.java | 16 ++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/ecfbc081/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java b/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java index a1524b9..1e33c4f 100644 --- a/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java +++ b/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java @@ -17,7 +17,8 @@ package org.apache.commons.dbutils; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -29,11 +30,11 @@ public class StatementConfigurationTest { public void testEmptyBuilder() { StatementConfiguration config = new StatementConfiguration.Builder().build(); - assertNull(config.getFetchDirection()); - assertNull(config.getFetchSize()); - assertNull(config.getMaxFieldSize()); - assertNull(config.getMaxRows()); - assertNull(config.getQueryTimeout()); + assertFalse(config.isFetchDirectionSet()); + assertFalse(config.isFetchSizeSet()); + assertFalse(config.isMaxFieldSizeSet()); + assertFalse(config.isMaxRowsSet()); + assertFalse(config.isQueryTimeoutSet()); } /** @@ -49,10 +50,19 @@ public class StatementConfigurationTest { .queryTimeout(5); StatementConfiguration config = builder.build(); + assertTrue(config.isFetchDirectionSet()); assertEquals(Integer.valueOf(1), config.getFetchDirection()); + + assertTrue(config.isFetchSizeSet()); assertEquals(Integer.valueOf(2), config.getFetchSize()); + + assertTrue(config.isMaxFieldSizeSet()); assertEquals(Integer.valueOf(3), config.getMaxFieldSize()); + + assertTrue(config.isMaxRowsSet()); assertEquals(Integer.valueOf(4), config.getMaxRows()); + + assertTrue(config.isQueryTimeoutSet()); assertEquals(Integer.valueOf(5), config.getQueryTimeout()); } http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/ecfbc081/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java b/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java index e3d638b..35b6f10 100644 --- a/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java +++ b/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.commons.dbutils.handlers.columns; import static org.junit.Assert.assertFalse;
