Package org.msgpack.testclasses

Examples of org.msgpack.testclasses.MapTypeFieldsClass


  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here


  Packer packer = msgpack.createPacker(out);
  tmpl.write(packer, v);
  byte[] bytes = out.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

  Template<MapTypeFieldsClass> tmpl = builder.buildTemplate(MapTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testListTypeFieldsClassNotNullable(ListTypeFieldsClassNotNullable v) throws Exception {
    }

    public void testMapTypeFieldsClass() throws Exception {
  testMapTypeFieldsClass(null);
  testMapTypeFieldsClass(new MapTypeFieldsClass());
  MapTypeFieldsClass v = new MapTypeFieldsClass();
        v.f0 = new HashMap<Integer, Integer>();
        v.f1 = new HashMap<Integer, Integer>();
        v.f1.put(1, 1);
        v.f1.put(2, 2);
        v.f1.put(3, 3);
View Full Code Here

  byte[] bytes = packer.toByteArray();
  BufferUnpacker u = msgpack.createBufferUnpacker();
  u.wrap(bytes);
  Value value = u.readValue();
  Converter unpacker = new Converter(value);
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  tmpl.write(packer, v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

  byte[] bytes = out.toByteArray();
  BufferUnpacker u = msgpack.createBufferUnpacker();
  u.wrap(bytes);
  Value value = u.readValue();
  Converter unpacker = new Converter(value);
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  tmpl.write(packer, v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  tmpl.write(packer, v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

TOP

Related Classes of org.msgpack.testclasses.MapTypeFieldsClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.