@Test public void testPairInproc() { Ctx ctx = ZMQ.zmq_init(1); assertThat(ctx, notNullValue()); SocketBase sb = ZMQ.zmq_socket(ctx, ZMQ.ZMQ_PAIR); assertThat(sb, notNullValue()); boolean brc = ZMQ.zmq_bind(sb, "inproc://a"); assertThat(brc, is(true)); SocketBase sc = ZMQ.zmq_socket(ctx, ZMQ.ZMQ_PAIR); assertThat(sc, notNullValue()); brc = ZMQ.zmq_connect(sc, "inproc://a"); assertThat(brc, is(true)); TestHelper.bounce(sb, sc); // Tear down the wiring. ZMQ.zmq_close(sb); ZMQ.zmq_close(sc); ZMQ.zmq_term(ctx); }
private Document getExampleDocument() { String html = TestHelper.getResourceAsString(new File("test_articles", "onet.html").getPath()); Document doc = Jsoup.parse(html); return doc; }