public void CanListAndReadFileInSubfolder() { using var archive = new TroikaArchive(TestData.GetPath("Core/IO/TroikaArchives/test.dat")); archive.FileExists("subfolder/test.txt").Should().BeTrue(); archive.ListDirectory("subfolder").Should().BeEquivalentTo("TEST.txt"); ReadAscii(archive, "subfolder/test.txt").Should().Be("random test data in subfolder"); }
public void CanDeleteFileInSubfolder(string pathToDelete) { using var archive = new TroikaArchive(TestData.GetPath("Core/IO/TroikaArchives/test.dat")); // Now mark the file as deleted archive.SetDeleted(pathToDelete); archive.FileExists("subfolder/TEST.txt").Should().BeFalse(); archive.ListDirectory("subfolder").Should().BeEmpty(); ReadAscii(archive, "subfolder/TEST.txt").Should().BeNull(); }