public void Test() { IFilter filter = new DiscImageChef.Filters.AppleSingle(); 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 CheckContents() { IFilter filter = new DiscImageChef.Filters.AppleSingle(); 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); }