/** * 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)); }
@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(); }
@Test public void testInit() throws Exception { App.init("not yet implemented", 10000); assertEquals(APP, App.instance()); }
/** * Rigorous Test :-) * * @throws IOException */ @Test public void testAppNull() throws IOException { App app = App.instance(); Notify notify = app.getNotify("/notify/test/tmplevt"); assertNull(notify); }
static { setUp(); APP = App.instance(); cleanZK("/notify/test/tmp"); }