Package org.msgpack.testclasses

Examples of org.msgpack.testclasses.EnumTypeFieldsClassNotNullable


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

    }

    public void testEnumTypeFieldsClassNotNullable() throws Exception {
  testEnumTypeFieldsClassNotNullable(null);
  try {
      testEnumTypeFieldsClassNotNullable(new EnumTypeFieldsClassNotNullable());
      Assert.fail();
  } catch (Throwable t) {
      Assert.assertTrue(t instanceof MessageTypeException);
  }
  EnumTypeFieldsClassNotNullable v = new EnumTypeFieldsClassNotNullable();
  v.f0 = 0;
  v.f1 = EnumTypeFieldsClassNotNullable.SampleEnum.ONE;
  testEnumTypeFieldsClassNotNullable(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);
  EnumTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

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

TOP

Related Classes of org.msgpack.testclasses.EnumTypeFieldsClassNotNullable

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.