diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2021-07-07 01:27:00 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2021-07-07 01:27:00 +0000 |
commit | a61e2da7fe9f76614013481c27a557455f080752 (patch) | |
tree | 6cee3ab375f1ecf944354ab734eb244e286637aa /src/test/java/com/healthmarketscience/jackcess | |
parent | f8afc8dabc20d4286f3cb4d1c693029ceb13ebfd (diff) | |
download | jackcess-a61e2da7fe9f76614013481c27a557455f080752.tar.gz jackcess-a61e2da7fe9f76614013481c27a557455f080752.zip |
Add Table methods to access the creation and last modified dates
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1375 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test/java/com/healthmarketscience/jackcess')
-rw-r--r-- | src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java b/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java index aa90a41..5f5a488 100644 --- a/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java @@ -1090,6 +1090,25 @@ public class DatabaseTest extends TestCase } } + public void testTableDates() throws Exception { + for (final TestDB testDB : SUPPORTED_DBS_TEST_FOR_READ) { + Table table = open(testDB).getTable("Table1"); + String expectedCreateDate = null; + String expectedUpdateDate = null; + if(testDB.getExpectedFileFormat() == FileFormat.V1997) { + expectedCreateDate = "2010-03-05T14:48:26.420"; + expectedUpdateDate = "2010-03-05T14:48:26.607"; + } else { + expectedCreateDate = "2004-05-28T17:51:48.701"; + expectedUpdateDate = "2006-07-24T09:56:19.701"; + } + System.out.println("FOO " + testDB.getExpectedFileFormat() + " " + + table.getCreatedDate() + " " + + table.getUpdatedDate()); + assertEquals(expectedCreateDate, table.getCreatedDate().toString()); + assertEquals(expectedUpdateDate, table.getUpdatedDate().toString()); + } + } private static void checkRawValue(String expected, Object val) { if(expected != null) { |