Esempio n. 1
0
        public void TestSafeStrings()
        {
            SafeStrings ss = new SafeStrings()
            {
                s1 = "111&", s2 = "222&"
            };
            CompactSerializer cs = new CompactSerializer(CSOptions.SafeString);
            string            d  = cs.Serialize(ss);

            Assert.AreEqual("111&222&", cs.Deserialize <SafeStrings>(d).ToString());
        }
Esempio n. 2
0
        public void TestMultiLine()
        {
            SafeStrings ss = new SafeStrings()
            {
                s1 = "111", s2 = "222"
            };
            CompactSerializer cs = new CompactSerializer('\n');
            string            d  = cs.Serialize(ss);

            Assert.AreEqual("111222", cs.Deserialize <SafeStrings>(d).ToString());
        }