From 99359ad5077e416c897e9596f081fc694f9ae5df Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 7 Aug 2011 16:10:43 -0400 Subject: Quick implementation of BETWEEN, IS NULL, and IS NOT NULL. --- tests/com/iciql/test/ModelsTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/com/iciql/test/ModelsTest.java') 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 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 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 -- cgit v1.2.3