From a06385c7c985f31561ad52a4643419ab57222e37 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Tue, 29 Jan 2019 02:04:49 +0000 Subject: 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 --- .../com/healthmarketscience/jackcess/util/ImportTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/test/java/com/healthmarketscience/jackcess/util') 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 _displaySizes = new ArrayList(); private List _scales = new ArrayList(); private List _precisions = new ArrayList(); - + 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); } } - -} + +} -- cgit v1.2.3