コード例 #1
0
        private static void SequenceSanityCheck(TileSequence sequence)
        {
            var encoded        = sequence.ToHybridEncoded();
            var sequenceRemade = TileSequence.FromEncoded(encoded);

            Assert.AreEqual(sequence, sequenceRemade);
        }
コード例 #2
0
        private static void CheckRoundTrip(string expected)
        {
            var collection = TileSequence.FromEncoded(expected);
            var actual     = collection.ToHybridEncoded();

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void GoodAndBadXmlTest()
        {
            var texts = new[] { "<T>Hello</T><T>World</T>", "<T>Hello", "<!-- Comment -->" };

            foreach (var text in texts)
            {
                var good = true;
                try
                {
                    _ = TileSequence.FromEncoded(text);
                }
                catch
                {
                    good = false;
                }

                Assert.AreEqual(text == texts[0], good);
            }
        }