Example #1
0
 public void testUpdate() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   CryptInfo ci = service.find(10);
   ci.setHashid(ci.hashCode());
   ci.setFilename("hello.jpg");
   ci.setFilepath("hi");
   ci.setDestpath("happy");
   service.update(ci);
   Log.i(tag, ci.toString());
 }
Example #2
0
 public void testSave() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   for (int i = 3; i < 4; i++) {
     CryptInfo ci = new CryptInfo();
     //			Log.i(tag,ci.getFilename()+" "+ci.getHashid());
     ci.setHashid(ci.hashCode() + (i * i * i));
     ci.setFilepath("");
     ci.setFilename("hello.jpg");
     ci.setFilesize(15);
     ci.setFiletype("jpg");
     ci.setMove(false);
     ci.setDestpath("");
     ci.setCryptdate(ci.getCryptdate().toString());
     Log.i(tag, ci.getFiletype() + " " + ci.getHashid());
     service.save(ci);
   }
 }
Example #3
0
 public void testFind() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   CryptInfo ci = service.find(10);
   Log.i(tag, ci.toString());
 }
Example #4
0
 public void testDelete() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   service.delete(5);
 }
Example #5
0
 public void testCount() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   long result = service.getCount();
   Log.i(tag, result + "");
 }