diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2008-04-07 03:08:36 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2008-04-07 03:08:36 +0000 |
commit | 4458461f520ef948b79d98264db6b0412b5b1498 (patch) | |
tree | 9f752f1c15214254c75d65a94239d10dc07e7eae /test/src | |
parent | d52cf53037e13c7a40a8e284d9e6690826a7936b (diff) | |
download | jackcess-4458461f520ef948b79d98264db6b0412b5b1498.tar.gz jackcess-4458461f520ef948b79d98264db6b0412b5b1498.zip |
make unit tests work for either index type; minor refactoring
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@315 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/java/com/healthmarketscience/jackcess/IndexTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java index cce6c62..4e5695a 100644 --- a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java @@ -152,13 +152,19 @@ public class IndexTest extends TestCase { // copy to temp file and attemp to edit db = openCopy(origFile); t = db.getTable("Table1"); - + index = t.getIndexes().get(0); + try { // we don't support writing these indexes t.addRow(99, "abc", "def"); - fail("Should have thrown IOException"); + if(index instanceof SimpleIndex) { + fail("Should have thrown UnsupportedOperationException"); + } } catch(UnsupportedOperationException e) { // success + if(index instanceof BigIndex) { + throw e; + } } } |