コード例 #1
0
 @Test
 public void testCreateReadAnyFirstTextWire() throws Exception {
   final Bytes<ByteBuffer> bytes = Bytes.elasticByteBuffer();
   final String expected = "world";
   TEXT.apply(bytes).write((() -> "hello")).text(expected);
   Assert.assertEquals(expected, READ_ANY.apply(bytes).read((() -> "hello")).text());
 }
コード例 #2
0
 @Test
 public void testReadAny() throws Exception {
   final Bytes<ByteBuffer> t = Bytes.elasticByteBuffer();
   final Wire wire = TEXT.apply(t);
   wire.write((() -> "hello")).text("world");
   Assert.assertEquals("world", READ_ANY.apply(t).read(() -> "hello").text());
 }