예제 #1
0
        public void AssertCanDecompress()
        {
            //var userid = "*****@*****.**";
            var e = new UudecodedUnGZipper(UuncodedCompressedData);

            var bytes = e.UnGZip();

            var contentXml = Encoding.UTF8.GetString(bytes);
            Assert.AreEqual(GarminXml, contentXml);
        }
예제 #2
0
 public void AssertCanDecompressFiles()
 {
     var fileNames = new[] { "garmin-uuencoded.txt" };
     foreach (var fileName in fileNames)
     {
         var filePath = Path.Combine(Environment.CurrentDirectory, fileName);
         var fileData = File.ReadAllText(filePath);
         var e = new UudecodedUnGZipper(fileData);
         var bytes = e.UnGZip();
         Assert.IsNotNull(bytes);
         var outFileName = fileName + ".xml";
         File.WriteAllBytes(outFileName, bytes);
     }
 }