summaryrefslogtreecommitdiffstats
path: root/test/src/java/com/healthmarketscience/jackcess/ImportTest.java
diff options
context:
space:
mode:
authorTim McCune <javajedi@users.sf.net>2005-04-07 14:32:19 +0000
committerTim McCune <javajedi@users.sf.net>2005-04-07 14:32:19 +0000
commit08dcaee297433626be8ac74d0723a4b22001ed7e (patch)
treee360b4105fde834bbaca122640ea66258e0aa7b8 /test/src/java/com/healthmarketscience/jackcess/ImportTest.java
downloadjackcess-hms.tar.gz
jackcess-hms.zip
Imported sourceshms
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/hms@2 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src/java/com/healthmarketscience/jackcess/ImportTest.java')
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/ImportTest.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/ImportTest.java b/test/src/java/com/healthmarketscience/jackcess/ImportTest.java
new file mode 100644
index 0000000..2caf825
--- /dev/null
+++ b/test/src/java/com/healthmarketscience/jackcess/ImportTest.java
@@ -0,0 +1,45 @@
+// Copyright (c) 2004 Health Market Science, Inc.
+
+package com.healthmarketscience.jackcess;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.healthmarketscience.jackcess.Database;
+
+import java.io.File;
+import junit.framework.TestCase;
+
+/**
+ * @author Rob Di Marco
+ */
+public class ImportTest extends TestCase
+{
+
+ /** The logger to use. */
+ private static final Log LOG = LogFactory.getLog(ImportTest.class);
+ public ImportTest(String name)
+ {
+ super(name);
+ }
+
+ private Database create() throws Exception {
+ File tmp = File.createTempFile("databaseTest", ".mdb");
+ tmp.deleteOnExit();
+ return Database.create(tmp);
+ }
+
+ public void testImportFromFile() throws Exception
+ {
+ Database db = create();
+ db.importFile("test", new File("test/data/sample-input.tab"), "\\t");
+ }
+
+ public void testImportFromFileWithOnlyHeaders() throws Exception
+ {
+ Database db = create();
+ db.importFile("test", new File("test/data/sample-input-only-headers.tab"),
+ "\\t");
+ }
+
+}