public void readfile() { MemoryStream stream = new MemoryStream(sampleData, false); PAKArchive archive = PAKArchive.ReadNew(stream); Assert.That(() => archive.ReadFile("../B/C/D.txt"), Throws.Exception); Assert.That(() => archive.ReadFile("../a/"), Throws.Exception); testStream(archive.ReadFile("a/A.txt"), "This is file a"); testStream(archive.ReadFile("a/B.txt"), "This is file b"); testStream(archive.ReadFile("a/c/d.txt"), "Hello World"); testStream(archive.ReadFile("a/e/f/g.txt"), "Zanzarah"); }