예제 #1
0
        public void CreatingAnElement()
        {
            var element = new EdiElement();
            element[02] = "1234";
            element[04] = "5678";

            Assert.IsNull(element[01]);
            Assert.AreEqual("1234", element[02]);
            Assert.IsNull(element[03]);
            Assert.AreEqual("5678", element[04]);
            Assert.IsNull(element[05]);
            Assert.AreEqual(1234, element.Component(02).RealValue);
            Assert.IsNull(element.Component(03));
        }
예제 #2
0
        public void CreatingAnElement()
        {
            var element = new EdiElement();

            element[02] = "1234";
            element[04] = "5678";

            Assert.IsNull(element[01]);
            Assert.AreEqual("1234", element[02]);
            Assert.IsNull(element[03]);
            Assert.AreEqual("5678", element[04]);
            Assert.IsNull(element[05]);
            Assert.AreEqual(1234, element.Component(02).RealValue);
            Assert.IsNull(element.Component(03));
        }
예제 #3
0
        public void UpdatingComponents()
        {
            var element = new EdiElement();
            element[01] = "ORIGINAL01";
            element[02] = "ORIGINAL02";
            element[03] = "ORIGINAL03";
            element[01] = "UPDATE01";
            element.Component(02).Value = "UPDATE02";
            element[03] = null;

            Assert.AreEqual("UPDATE01", element[01]);
            Assert.AreEqual("UPDATE02", element[02]);
            Assert.IsNull(element[03]);
        }
예제 #4
0
        public void UpdatingComponents()
        {
            var element = new EdiElement();

            element[01] = "ORIGINAL01";
            element[02] = "ORIGINAL02";
            element[03] = "ORIGINAL03";
            element[01] = "UPDATE01";
            element.Component(02).Value = "UPDATE02";
            element[03] = null;

            Assert.AreEqual("UPDATE01", element[01]);
            Assert.AreEqual("UPDATE02", element[02]);
            Assert.IsNull(element[03]);
        }