aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/com/healthmarketscience/jackcess/util
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2019-01-29 02:04:49 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2019-01-29 02:04:49 +0000
commita06385c7c985f31561ad52a4643419ab57222e37 (patch)
treea35f2791a97155bbd655a4dbe56724a30fdc454a /src/test/java/com/healthmarketscience/jackcess/util
parentcb9ed9bd0bee33de31c4c3323dc46cac53be2745 (diff)
downloadjackcess-a06385c7c985f31561ad52a4643419ab57222e37.tar.gz
jackcess-a06385c7c985f31561ad52a4643419ab57222e37.zip
Use column label from ResultSetMetaData when importing. Fixes #152
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1268 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test/java/com/healthmarketscience/jackcess/util')
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/util/ImportTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/util/ImportTest.java b/src/test/java/com/healthmarketscience/jackcess/util/ImportTest.java
index 97c0faf..5e0b036 100644
--- a/src/test/java/com/healthmarketscience/jackcess/util/ImportTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/util/ImportTest.java
@@ -39,9 +39,9 @@ import com.healthmarketscience.jackcess.impl.JetFormatTest;
import junit.framework.TestCase;
import static com.healthmarketscience.jackcess.TestUtil.*;
-/**
+/**
* @author Rob Di Marco
- */
+ */
public class ImportTest extends TestCase
{
@@ -194,7 +194,7 @@ public class ImportTest extends TestCase
assertEquals(Arrays.asList(
"RESULT_PHYS_ID", "FIRST", "MIDDLE", "LAST", "OUTLIER",
"RANK", "CLAIM_COUNT", "PROCEDURE_COUNT",
- "WEIGHTED_CLAIM_COUNT", "WEIGHTED_PROCEDURE_COUNT"),
+ "WEIGHTED_CLAIM_COUNT", "WEIGHTED_PROCEDURE_COUNT"),
colNames);
db.close();
@@ -271,7 +271,7 @@ public class ImportTest extends TestCase
private List<Integer> _displaySizes = new ArrayList<Integer>();
private List<Integer> _scales = new ArrayList<Integer>();
private List<Integer> _precisions = new ArrayList<Integer>();
-
+
public Object invoke(Object proxy, Method method, Object[] args)
{
String methodName = method.getName();
@@ -284,7 +284,8 @@ public class ImportTest extends TestCase
return Boolean.FALSE;
} else if(methodName.equals("getColumnCount")) {
return _types.size();
- } else if(methodName.equals("getColumnName")) {
+ } else if(methodName.equals("getColumnName") ||
+ methodName.equals("getColumnLabel")) {
return getValue(_names, args[0]);
} else if(methodName.equals("getColumnDisplaySize")) {
return getValue(_displaySizes, args[0]);
@@ -318,5 +319,5 @@ public class ImportTest extends TestCase
return values.get((Integer)index - 1);
}
}
-
-}
+
+}