public void ReadLength()
        {
            ParserContext parserContext = new ParserContext(
                ParserContext.DefaultBufferSize);
            FixedLengthManager lengthManager = new FixedLengthManager(10);

            Assert.IsTrue(lengthManager.ReadLength(ref parserContext) == 10);
        }
        public void WriteLength()
        {
            FormatterContext formatterContext = new FormatterContext(
                FormatterContext.DefaultBufferSize);
            FixedLengthManager lengthManager = new FixedLengthManager(10);

            lengthManager.WriteLength(null, 10, 10, ref formatterContext);
            try {
                lengthManager.WriteLength(null, 5, 5, ref formatterContext);
                Assert.Fail();
            } catch (ArgumentOutOfRangeException e) {
                Assert.IsTrue(e.ParamName.Equals("dataLength"));
            }
        }
        public void MaximumLength()
        {
            FixedLengthManager lengthManager = new FixedLengthManager(20);

            Assert.IsTrue(lengthManager.MaximumLength == 20);
        }