//protected async Task ZipSingleFileContentCore() //{ // string tempDir = GetTempDirectory(); // string dummyFileName = "dummy.txt"; // string dummyFolderPath = Utils.CreateDummyDirectory(_mockData.ResourceFolder, tempDir, cleanFolder: true); // string dummyFilePath = Utils.CreateDummyFile(dummyFolderPath, dummyFileName, cleanFolder: false); // byte[] originalBytes = await KFile.ReadAllBytesAsync(dummyFilePath); // Stream streamOfOriginalBytes = new MemoryStream(originalBytes); // Stream streamOfZippedBytes = Zipper.ZipSingleFileContent(originalBytes, "pippo"); // Assert.False(true); // Utils.RemoveDir(dummyFolderPath); //} protected void UnZipStringCore() { string tempDir = GetTempDirectory(); string dummyFileName = "dummy.txt"; string dummyFolderPath = Utils.CreateDummyDirectory(_mockData.ResourceFolder, tempDir, cleanFolder: true); string dummyFilePath = Utils.CreateDummyFile(dummyFolderPath, dummyFileName, cleanFolder: true); string zippedString = Zipper.ZipString(dummyFilePath); string unZippedString = Zipper.UnZipString(zippedString); Assert.Equal(Zipper.ZipString(unZippedString), zippedString); Utils.RemoveDir(dummyFolderPath); }
protected async Task ZipStringCore() { string tempDir = GetTempDirectory(); string dummyFileName = "dummy.txt"; string dummyFolderPath = Utils.CreateDummyDirectory(_mockData.ResourceFolder, tempDir, cleanFolder: true); Utils.CreateDummyFile(dummyFolderPath, dummyFileName, cleanFolder: true); string originalString = await KFile.ReadAllTextAsync(Path.Combine(dummyFolderPath, dummyFileName)); string zippedString = Zipper.ZipString(originalString); Assert.Equal(Zipper.UnZipString(zippedString), originalString); Utils.RemoveDir(dummyFolderPath); }