Esempio n. 1
0
        public void XmlSerializationTest()
        {
            foreach (var expected in EqualityTiles)
            {
                var xml = XmlHelper.WriteXmlFragment(writer => expected.ToXmlWriter(writer, true));

                var actual = xml.ReadXmlFragment <TileData>(reader =>
                {
                    reader.Read();
                    var tile = TileData.FromXmlReader(reader);
                    return(tile);
                });

                Assert.AreEqual(expected, actual);
            }
        }