コード例 #1
0
        public void TestFromMessageString()
        {
            var          hash      = new HashtableMessage();
            const string MsgString = "15Unit1227This is the data for unit 1210TagNumber215tag 2";

            hash.FromMessageString(MsgString);

            Assert.AreEqual("This is the data for unit 1", hash["Unit1"]);
            Assert.AreEqual("tag 2", hash["TagNumber2"]);

            Assert.AreEqual(2, hash.Keys.Count);
            Assert.AreEqual(2, hash.Count);
        }