Package org.msgpack.testclasses

Examples of org.msgpack.testclasses.EnumTypeFieldsClass


  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  EnumTypeFieldsClass 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));
  EnumTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testInterface() throws Exception {
    }

    public void testEnumTypeFieldsClass() throws Exception {
  testEnumTypeFieldsClass(null);
  testEnumTypeFieldsClass(new EnumTypeFieldsClass());
  EnumTypeFieldsClass v = new EnumTypeFieldsClass();
  v.f0 = 0;
  v.f1 = EnumTypeFieldsClass.SampleEnum.ONE;
  testEnumTypeFieldsClass(v);
    }
View Full Code Here

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

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

TOP

Related Classes of org.msgpack.testclasses.EnumTypeFieldsClass

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.