private static void SequenceSanityCheck(TileSequence sequence) { var encoded = sequence.ToHybridEncoded(); var sequenceRemade = TileSequence.FromEncoded(encoded); Assert.AreEqual(sequence, sequenceRemade); }
private static void CheckRoundTrip(string expected) { var collection = TileSequence.FromEncoded(expected); var actual = collection.ToHybridEncoded(); Assert.AreEqual(expected, actual); }
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); } }