Ejemplo n.º 1
0
        public void CompatibilityDecompressEncodedURIComponentFromNode(LZStringTestCase test)
        {
            var compress   = RunNodeLzString("compressToEncodedURIComponent", test.Uncompressed);
            var uncompress = "";

            try
            {
                uncompress = LZString.DecompressFromEncodedURIComponent(compress);
            }
            catch (FormatException exc)
            {
                Assert.Fail($"Invalid EncodedURIComponent string: '{compress}'{Environment.NewLine}{exc.Message}");
            }
            Console.WriteLine("lz-string compression result:");
            Console.WriteLine(compress);
            Assert.That(uncompress, Is.EqualTo(test.Uncompressed));
        }
Ejemplo n.º 2
0
 public void DecompressFromEncodedURIComponent(LZStringTestCase test)
 {
     Assert.That(LZString.DecompressFromEncodedURIComponent(test.CompressedEncodedURIComponent), Is.EqualTo(test.Uncompressed));
 }