public void CanLibrarySaveChanges() { HalvaPackage package = new HalvaPackage(destinationArchive); package.RemoveFileFromList("TestImage.webp"); package.Save(); package.AddFileToList(Path.Combine(sourceFolder, "TestImage.webp")); package.Save(); }
public void CanArchiveRemoveEntry() { HalvaPackage package = new HalvaPackage(PackageUtilities.TempArchive, destinationArchive); package.RemoveFileFromList("TestImage.webp"); package.CloseArchive(); if (Directory.Exists(destinationFolder)) { Directory.Delete(destinationFolder, true); } PackageUtilities.ExportFromArchive(destinationArchive, destinationFolder); Assert.Equal(2, Directory.EnumerateFiles(destinationFolder).Count()); package.Dispose(); }