public void TestToString()
        {
            Message value = new Message();

            value.Formatter = GetFormatter(_fixedMessageFormatter);
            value.Fields.Add(1, "98");
            value.Fields.Add(2, "345");

            InnerMessageField field = new InnerMessageField(12);

            Assert.IsTrue(string.Empty == field.ToString());
            field.Value = value;

            Assert.IsTrue(field.ToString() == "1:98,2:345");
        }
        public void TestClone()
        {
            Message value = new Message();

            value.Formatter = GetFormatter(_fixedMessageFormatter);
            value.Fields.Add(1, "12");
            value.Fields.Add(2, "345");

            InnerMessageField field = new InnerMessageField(14);

            InnerMessageField clonedField = ( InnerMessageField )(field.Clone());

            Assert.IsNull(clonedField.Value);
            Assert.IsTrue(field.FieldNumber == clonedField.FieldNumber);

            field.Value = value;
            clonedField = ( InnerMessageField )(field.Clone());

            Assert.IsTrue(field.ToString() == clonedField.ToString());
            Assert.IsTrue(field.Value != clonedField.Value);
        }