Exemplo n.º 1
0
        public void TestSerialization()
        {
            Fingerprint fp1 = new Fingerprint(65);
            Fingerprint fp2 = new Fingerprint(65);

            fp1.Touch(0);
            fp1.Touch(2);
            fp1.Touch(31);
            fp1.Touch(32);

            Assert.False(fp2.Equals(fp1));

            Buffer buffer = new Buffer(12);
            fp1.Dump(buffer);
            buffer.Rewind();
            fp2.Load(buffer);

            Assert.True(fp2.Equals(fp1));
        }