Exemplo n.º 1
0
        public void Read_Works()
        {
            var buffer = File.ReadAllBytes("Dmg/compressedblock.bin");

            var checksum = new UdifChecksum();

            checksum.ReadFrom(buffer, 0x3c);
            Assert.Equal("AAAAIEoNh3YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", Convert.ToBase64String(checksum.Data));
            Assert.Equal(2u, checksum.ChecksumSize);
            Assert.Equal(136, checksum.Size);
            Assert.Equal(0u, checksum.Type);
        }
Exemplo n.º 2
0
        public void WriteTo_Throws()
        {
            var checksum = new UdifChecksum();

            Assert.Throws <NotImplementedException>(() => checksum.WriteTo(null, 0));
        }