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(); }
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); }
public void CheckContents() { IFilter filter = new MacBinary(); filter.Open(location); Stream str = filter.GetDataForkStream(); byte[] data = new byte[737280]; str.Read(data, 0, 737280); str.Close(); str.Dispose(); filter.Close(); string result = Md5Context.Data(data, out _); Assert.AreEqual(EXPECTED_CONTENTS, result); }