From a61e2da7fe9f76614013481c27a557455f080752 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Wed, 7 Jul 2021 01:27:00 +0000 Subject: 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 --- .../healthmarketscience/jackcess/DatabaseTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/test/java/com/healthmarketscience/jackcess') 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) { -- cgit v1.2.3