Author: batosai
Date: 2008-08-31 16:13:55 +0000 (Sun, 31 Aug 2008)
New Revision: 22281
Modified:
trunk/apps/WoT/src/plugins/WoT/WotTestDrive.java
Log:
Re-added code to empty the database before selftests. For some reason, it
doesn't work. If you can figure why, please tell me...
Modified: trunk/apps/WoT/src/plugins/WoT/WotTestDrive.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/WotTestDrive.java 2008-08-31 15:36:00 UTC
(rev 22280)
+++ trunk/apps/WoT/src/plugins/WoT/WotTestDrive.java 2008-08-31 16:13:55 UTC
(rev 22281)
@@ -36,6 +36,16 @@
public String fullTest() {
StringBuffer out = new StringBuffer();
+
+ // This doesn't work. WHY ?!?
+ out.append("Empty the database ");
+ ObjectSet<Object> all = db.queryByExample(Object.class);
+ while(all.hasNext()) db.delete(all.next());
+ db.commit();
+ ObjectSet<Object> all2 = db.queryByExample(Object.class);
+ if(all2.size() != 0) out.append("OK\n");
+ else out.append("NOK !\n");
+
out.append("* Create 3 identities:");
OwnIdentity a = createIdentity(out,"a");