public void ShouldWriteStartGroup()
        {
            var output = new MemoryStream();
            var writer = new MessageWriter(output, new GroupEncodingObjectWriterStrategy());
            writer.WriteObject(new Test1(), 1);

            output.Position = 0;
            Assert.AreEqual(
                (byte)MessageTag.AsInt(1, WireType.StartGroup),
                output.ReadByte());
        }
        public void ShouldTerminateWithEndGroup()
        {
            var output = new MemoryStream();
            var writer = new MessageWriter(output, new GroupEncodingObjectWriterStrategy());
            writer.WriteObject(new Test1(), 1);

            var bytes = output.ToArray();

            Assert.AreEqual(
                (byte)MessageTag.AsInt(1, WireType.EndGroup),
                bytes[bytes.Length - 1]);
        }
        public void ShouldNotIncludeLength()
        {
            var output = new MemoryStream();
            var writer = new MessageWriter(output, new GroupEncodingObjectWriterStrategy());
            writer.WriteObject(new Test1(), 1);

            var bytes = output.ToArray();

            Assert.AreEqual(
                (byte)MessageTag.AsInt(1, WireType.Varint),
                bytes[1]);
        }