Ejemplo n.º 1
0
        public void SmallPayload()
        {
            var packer = new DataPacker(new IdentityTransformer());
            var output = new byte[32];
            var input  = new byte[5];

            new Random().NextBytes(input);
            var inputCopy = new byte[input.Length];

            Array.Copy(input, inputCopy, input.Length);

            var bytesWritten = packer.PackData(1, 2, new ArraySegment <byte>(input), new ArraySegment <byte>(output));

            VerifyOutput(inputCopy, output, bytesWritten);
        }