Package mungbean.protocol

Examples of mungbean.protocol.LittleEndianDataReader.readByte()


            specify(out.toByteArray(), does.containExactly(MAP_FIXTURE));
        }

        public void mapCanBeDecodedFromBson() {
            LittleEndianDataReader reader = new LittleEndianDataReader(new ByteArrayInputStream(MAP_FIXTURE));
            specify(reader.readByte(), does.equal((byte) 3));
            specify(context.readPath(reader, ""), does.equal("foo"));
            Map<String, Object> ret = context.read(new MapBSONCoders(), reader);
            specify(ret.get("foo"), does.equal(1));
            specify(ret.get("bar"), new HashMap<String, Object>() {
                {
View Full Code Here


            specify(out.toByteArray(), does.containExactly(MAP_FIXTURE));
        }

        public void mapCanBeDecodedFromBson() {
            LittleEndianDataReader reader = new LittleEndianDataReader(new ByteArrayInputStream(MAP_FIXTURE));
            specify(reader.readByte(), does.equal((byte) 3));
            specify(context.readPath(reader, ""), does.equal("foo"));
            Map<String, Object> ret = context.read(new MapBSONCoders(), reader);
            specify(ret.get("foo"), does.equal(1));
            specify(ret.get("bar"), does.equal("zap"));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.