Beispiel #1
0
        public void TestDeserialize()
        {
            var serializer = new POSerializer();
            var s          = serializer.Serialize(SimplePO.Default());

            serializer = new POSerializer();

            var deserialized = serializer.Deserialize(s);

            Console.WriteLine(deserialized[0].ToString());
            Assert.AreEqual(SimplePO.Default(), deserialized[0]);
        }
Beispiel #2
0
        public void TestSerializeToXml()
        {
            var serializer = new POSerializer();
            var s          = serializer.Serialize(SimplePO.Default());
            var xSer       = new XmlSerializer(typeof(SerializationResult));

            using (var memStrm = new MemoryStream())
            {
                xSer.Serialize(memStrm, s);
                Console.WriteLine(Encoding.Default.GetString(memStrm.ToArray()));
            }
        }
Beispiel #3
0
 public IEnumerable <TestCaseData> GetTargets()
 {
     yield return(new TestCaseData(SimplePO.Default()));
 }
Beispiel #4
0
 public void TestSerialize()
 {
     var serializer = new POSerializer();
     var s          = serializer.Serialize(SimplePO.Default());
 }