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()); }
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()); }