diff options
author | James Moger <james.moger@gmail.com> | 2011-08-07 16:10:43 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-08-07 16:10:43 -0400 |
commit | 99359ad5077e416c897e9596f081fc694f9ae5df (patch) | |
tree | 523842d1899c91e88729c3dcb0b23e2ea8e78ebd /tests/com/iciql/test/ModelsTest.java | |
parent | 684838def9e1646c266ffb46bbc65b5dfdc8f14d (diff) | |
download | iciql-99359ad5077e416c897e9596f081fc694f9ae5df.tar.gz iciql-99359ad5077e416c897e9596f081fc694f9ae5df.zip |
Quick implementation of BETWEEN, IS NULL, and IS NOT NULL.
Diffstat (limited to 'tests/com/iciql/test/ModelsTest.java')
-rw-r--r-- | tests/com/iciql/test/ModelsTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/com/iciql/test/ModelsTest.java b/tests/com/iciql/test/ModelsTest.java index acaf634..c529012 100644 --- a/tests/com/iciql/test/ModelsTest.java +++ b/tests/com/iciql/test/ModelsTest.java @@ -131,6 +131,11 @@ public class ModelsTest { List<EnumModels> list = db.from(e).where(e.tree()).atLeast(Tree.BIRCH).select(); assertEquals(3, list.size()); + + // between is an int compare + list = db.from(e).where(e.tree()).between(Tree.BIRCH, Tree.WALNUT).select(); + assertEquals(2, list.size()); + } private void testStringEnums(EnumModels e, List<?> models) { @@ -143,6 +148,10 @@ public class ModelsTest { List<EnumModels> list = db.from(e).where(e.tree()).isNot(Tree.BIRCH).select(); assertEquals(models.size() - 1, list.size()); + + // between is a string compare + list = db.from(e).where(e.tree()).between(Tree.MAPLE, Tree.PINE).select(); + assertEquals(3, list.size()); } @Test |