Exemplo n.º 1
0
 /**
  * Rigorous Test :-)
  *
  * @throws IOException
  */
 @Test
 public void testInstanceProp() throws IOException {
   App app = App.instance();
   Notify notify = app.getNotify("/notify/test");
   notify.replaceProperty("a".getBytes(), "I Love it.".getBytes());
   byte[] v = notify.getProperty("a".getBytes());
   System.out.println(new String(v));
 }
Exemplo n.º 2
0
  @Override
  public void run() {
    Log.i(TAG, "Running...");
    while (!interrupted()) {
      try {
        // Cursor c = mHelper.sampleFromContacts(10);
        // c.moveToFirst();
        // while(!c.isAfterLast()){

        //     c.moveToNext();

        // }
        if (App.instance().isScreenOn()) {
          Thread.sleep(10000);
        } else {
          Thread.sleep(60000);
        }
      } catch (Exception e) {
        Log.wtf(TAG, e);
      }
    }
    mHelper.close();
  }
Exemplo n.º 3
0
 @Test
 public void testInit() throws Exception {
   App.init("not yet implemented", 10000);
   assertEquals(APP, App.instance());
 }
Exemplo n.º 4
0
 /**
  * Rigorous Test :-)
  *
  * @throws IOException
  */
 @Test
 public void testAppNull() throws IOException {
   App app = App.instance();
   Notify notify = app.getNotify("/notify/test/tmplevt");
   assertNull(notify);
 }
Exemplo n.º 5
0
 static {
   setUp();
   APP = App.instance();
   cleanZK("/notify/test/tmp");
 }