Package org.msgpack.testclasses

Examples of org.msgpack.testclasses.MapTypeFieldsClassNotNullable


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

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

    }

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

TOP

Related Classes of org.msgpack.testclasses.MapTypeFieldsClassNotNullable

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.