示例#1
0
        public void CloneTest()
        {
            string tag = "001";
            string data = "  2007032296";
            ControlField target = new ControlField(tag, data);

            Field expected = target;
            Field actual;
            actual = target.Clone();
            Assert.AreNotEqual(expected, actual);

            target.Data = "  2011063096";

            string expectedString = data;
            string actualString;
            actualString = ((ControlField)actual).Data;
            Assert.AreEqual(expectedString, actualString);

            target.Tag = "002";

            expectedString = tag;
            actualString = ((ControlField)actual).Tag;
            Assert.AreEqual(expectedString, actualString);
        }