Exemple #1
0
        public void Test()
        {
            IFilter filter = new MacBinary();

            filter.Open(location);
            Assert.AreEqual(true, filter.IsOpened());
            Assert.AreEqual(737280, filter.GetDataForkLength());
            Assert.AreNotEqual(null, filter.GetDataForkStream());
            Assert.AreEqual(286, filter.GetResourceForkLength());
            Assert.AreNotEqual(null, filter.GetResourceForkStream());
            Assert.AreEqual(true, filter.HasResourceFork());
            filter.Close();
        }
Exemple #2
0
        public void CheckResource()
        {
            IFilter filter = new MacBinary();

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

            byte[] data = new byte[286];
            str.Read(data, 0, 286);
            str.Close();
            str.Dispose();
            filter.Close();
            string result = Md5Context.Data(data, out _);

            Assert.AreEqual(EXPECTED_RESOURCE, result);
        }