You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by th...@apache.org on 2015/04/20 08:32:40 UTC

svn commit: r1674747 - in /commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils: StatementConfigurationTest.java handlers/columns/ColumnHandlerTestBase.java

Author: thecarlhall
Date: Mon Apr 20 06:32:40 2015
New Revision: 1674747

URL: http://svn.apache.org/r1674747
Log:
Clean up tests and add missing source header

Modified:
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java?rev=1674747&r1=1674746&r2=1674747&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/StatementConfigurationTest.java Mon Apr 20 06:32:40 2015
@@ -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());
     }
 

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java?rev=1674747&r1=1674746&r2=1674747&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java (original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/handlers/columns/ColumnHandlerTestBase.java Mon Apr 20 06:32:40 2015
@@ -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;