public void testBar() throws Exception { Bar bar = SerializableObjects.bar; protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); }
public void testBar() throws Exception { Bar bar = SerializableObjects.bar; protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); }
public void testBar() throws Exception { Bar bar = SerializableObjects.bar; protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); }
public void testBar() throws Exception { Bar bar = SerializableObjects.bar; protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); }
public void testBar() throws Exception { Bar bar = SerializableObjects.bar; protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema(), false); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema(), false); // numeric protobufRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema(), true); protostuffRoundTrip(bar, Bar.getSchema(), Bar.getPipeSchema(), true); }
public void testBar() throws Exception { Bar bar = SerializableObjects.bar; roundTrip(bar, Bar.getSchema(), Bar.getPipeSchema()); }
public void testBar() throws Exception { Bar bar = new Bar(); bar.setSomeInt(1); bar.setSomeBytes(ByteString.copyFromUtf8(ESCAPE_TARGET)); bar.setSomeString(ESCAPE_TARGET); byte[] protostuff = ProtostuffIOUtil.toByteArray(bar, bar.cachedSchema(), buf()); byte[] json = JsonIOUtil.toByteArray(ProtostuffIOUtil.newPipe(protostuff), Bar.getPipeSchema(), false); byte[] json2 = JsonXIOUtil.toByteArray(ProtostuffIOUtil.newPipe(protostuff), Bar.getPipeSchema(), false, buf()); assertTrue(json.length == json2.length); String strJson = STRING.deser(json); String strJson2 = STRING.deser(json2); assertEquals(strJson, strJson2); System.err.println(strJson); System.err.println(strJson2); }