aboutsummaryrefslogtreecommitdiffstats
path: root/tests/com/iciql/test/PrimitivesTest.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2011-08-08 11:12:50 -0400
committerJames Moger <james.moger@gmail.com>2011-08-08 11:12:50 -0400
commit35973f16d6e408fff3e9eeeda4dac4ab3f7cb048 (patch)
treebd266925e65837ecbfe18ac3b734a05d6bf49bdc /tests/com/iciql/test/PrimitivesTest.java
parentf7485f5f18e49cef057782c0c3137e64a5af542c (diff)
downloadiciql-35973f16d6e408fff3e9eeeda4dac4ab3f7cb048.tar.gz
iciql-35973f16d6e408fff3e9eeeda4dac4ab3f7cb048.zip
Documentation. EnumType default is NAME.
Diffstat (limited to 'tests/com/iciql/test/PrimitivesTest.java')
-rw-r--r--tests/com/iciql/test/PrimitivesTest.java29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/com/iciql/test/PrimitivesTest.java b/tests/com/iciql/test/PrimitivesTest.java
index aee2479..2d591c3 100644
--- a/tests/com/iciql/test/PrimitivesTest.java
+++ b/tests/com/iciql/test/PrimitivesTest.java
@@ -37,22 +37,27 @@ public class PrimitivesTest {
db.insert(model);
PrimitivesModel p = new PrimitivesModel();
-
+
// retrieve model and compare
PrimitivesModel retrievedModel = db.from(p).selectFirst();
assertTrue(model.equivalentTo(retrievedModel));
- // retrieve with conditions and compare
-// StatementLogger.activateConsoleLogger();
-// retrievedModel = db.from(p).where(p.myLong).is(model.myLong).and(p.myInteger).is(model.myInteger)
-// .selectFirst();
-// assertTrue(model.equivalentTo(retrievedModel));
-//
-// // update myInteger and compare
-// db.from(p).set(p.myInteger).to(10).where(p.myLong).is(model.myLong).update();
-// retrievedModel = db.from(p).selectFirst();
-
-// assertEquals(10, retrievedModel.myInteger);
+ retrievedModel = db.from(p).where("mylong = ? and myinteger = ?", model.myLong, model.myInteger)
+ .selectFirst();
+ assertTrue(model.equivalentTo(retrievedModel));
+
+ // retrieve with conditions and compare
+ // StatementLogger.activateConsoleLogger();
+ // retrievedModel =
+ // db.from(p).where(p.myLong).is(model.myLong).and(p.myInteger).is(model.myInteger)
+ // .selectFirst();
+ // assertTrue(model.equivalentTo(retrievedModel));
+ //
+ // // update myInteger and compare
+ // db.from(p).set(p.myInteger).to(10).where(p.myLong).is(model.myLong).update();
+ // retrievedModel = db.from(p).selectFirst();
+
+ // assertEquals(10, retrievedModel.myInteger);
db.close();
}