Esempio n. 1
0
        public void Test()
        {
            IFilter filter = new DiscImageChef.Filters.GZip();

            filter.Open(location);
            Assert.AreEqual(true, filter.IsOpened());
            Assert.AreEqual(1048576, filter.GetDataForkLength());
            Assert.AreNotEqual(null, filter.GetDataForkStream());
            Assert.AreEqual(0, filter.GetResourceForkLength());
            Assert.AreEqual(null, filter.GetResourceForkStream());
            Assert.AreEqual(false, filter.HasResourceFork());
            filter.Close();
        }
Esempio n. 2
0
        public void CheckContents()
        {
            IFilter filter = new DiscImageChef.Filters.GZip();

            filter.Open(location);
            Stream str = filter.GetDataForkStream();

            byte[] data = new byte[1048576];
            str.Read(data, 0, 1048576);
            str.Close();
            str.Dispose();
            filter.Close();
            Md5Context.Data(data, out byte[] result);
            Assert.AreEqual(ExpectedContents, result);
        }