public void testEmit() throws Exception {
        eh.on("ok", new EventEmitter.Listener() {
            @Override
            public void onEvent(Object data) {
                String ss = (String) data;
                if (ss == "ok")
                    Log.d(TAG, "pass@" + ss);
                else
                    Log.d(TAG, "fail@" + ss);
            }
        });
        eh.on("no", new EventEmitter.Listener() {
            @Override
            public void onEvent(Object data) {
                String ss = (String) data;
                if (ss == "no")
                    Log.d(TAG, "pass@" + ss);
                else
                    Log.d(TAG, "fail@" + ss);
            }
        });
        eh.emit("ok");
        eh.emit("ok", "ok");
        eh.emit("ok", "no");
        eh.emit("no");
        eh.emit("no", "no");
        eh.emit("no", "ok");
        eh.emit("unknown");
        eh.emit("unknown", "ok");
        eh.emit("unknown", "no");
        fail(); // FIXME these tests are not correct
    }
public void testEmit() throws Exception {
        eh.on("ok", new EventEmitter.Listener() {
            @Override
            public void onEvent(Object data) {
                String ss = (String) data;
                if (ss == "ok")
                    Log.d(TAG, "pass@" + ss);
                else
                    Log.d(TAG, "fail@" + ss);
            }
        });
        eh.on("no", new EventEmitter.Listener() {
            @Override
            public void onEvent(Object data) {
                String ss = (String) data;
                if (ss == "no")
                    Log.d(TAG, "pass@" + ss);
                else
                    Log.d(TAG, "fail@" + ss);
            }
        });
        eh.emit("ok");
        eh.emit("ok", "ok");
        eh.emit("ok", "no");
        eh.emit("no");
        eh.emit("no", "no");
        eh.emit("no", "ok");
        eh.emit("unknown");
        eh.emit("unknown", "ok");
        eh.emit("unknown", "no");
        fail();
    }
public void testemit() throws exception { eh.on("ok", new eventemitter.listener() { @override public void onevent(object data) { string ss = (string) data; if (ss == "ok") log.d(tag, "pass@" + ss); else log.d(tag, "fail@" + ss); } }); eh.on("no", new eventemitter.listener() { @override public void onevent(object data) { string ss = (string) data; if (ss == "no") log.d(tag, "pass@" + ss); else log.d(tag, "fail@" + ss); } }); eh.emit("ok"); eh.emit("ok", "ok"); eh.emit("ok", "no"); eh.emit("no"); eh.emit("no", "no"); eh.emit("no", "ok"); eh.emit("unknown"); eh.emit("unknown", "ok"); eh.emit("unknown", "no"); fail(); }