Exemplo n.º 1
0
 @Test
 public void testGetNotify() throws Exception {
   Notify notify1 = APP.getNotify("/notify/test");
   Notify notify2 = APP.getNotify("/notify/test/tmp");
   Notify notify3 = APP.getNotify(new String("/notify/test/tmp"));
   assertNotEquals(notify1, notify2);
   assertEquals(notify3, notify2);
 }
Exemplo n.º 2
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.º 3
0
 @Test(expected = NullPointerException.class)
 public void testClose() throws Exception {
   App app = new App(URL, 10000);
   app.notifyMap = null;
   try {
     app.getNotify("/notify/test");
   } finally {
     app.close();
   }
 }
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);
 }