public void TestBsonBinaryDataEquals()
        {
            var a = new BsonBinaryData(new byte[] { 1, 2, 3 });
            var b = new BsonBinaryData(new byte[] { 1, 2, 3 });
            var c = new BsonBinaryData(new byte[] { 2, 3, 4 });
            var n = (BsonBinaryData)null;

            Assert.IsTrue(object.Equals(a, b));
            Assert.IsFalse(object.Equals(a, c));
            Assert.IsFalse(object.Equals(a, BsonNull.Value));
            Assert.IsFalse(a.Equals(n));
            Assert.IsFalse(a.Equals(null));

            Assert.IsTrue(a == b);
            Assert.IsFalse(a == c);
            Assert.IsFalse(a == BsonNull.Value);
            Assert.IsFalse(a == null);
            Assert.IsFalse(null == a);
            Assert.IsTrue(n == null);
            Assert.IsTrue(null == n);

            Assert.IsFalse(a != b);
            Assert.IsTrue(a != c);
            Assert.IsTrue(a != BsonNull.Value);
            Assert.IsTrue(a != null);
            Assert.IsTrue(null != a);
            Assert.IsFalse(n != null);
            Assert.IsFalse(null != n);
        }
        public void TestBsonBinaryDataEquals()
        {
            var a = new BsonBinaryData(new byte[] { 1, 2, 3 });
            var b = new BsonBinaryData(new byte[] { 1, 2, 3 });
            var c = new BsonBinaryData(new byte[] { 2, 3, 4 });
            var n = (BsonBinaryData)null;

            Assert.IsTrue(object.Equals(a, b));
            Assert.IsFalse(object.Equals(a, c));
            Assert.IsFalse(object.Equals(a, BsonNull.Value));
            Assert.IsFalse(a.Equals(n));
            Assert.IsFalse(a.Equals(null));

            Assert.IsTrue(a == b);
            Assert.IsFalse(a == c);
            Assert.IsFalse(a == BsonNull.Value);
            Assert.IsFalse(a == null);
            Assert.IsFalse(null == a);
            Assert.IsTrue(n == null);
            Assert.IsTrue(null == n);

            Assert.IsFalse(a != b);
            Assert.IsTrue(a != c);
            Assert.IsTrue(a != BsonNull.Value);
            Assert.IsTrue(a != null);
            Assert.IsTrue(null != a);
            Assert.IsFalse(n != null);
            Assert.IsFalse(null != n);
        }
 public bool compareBinaryImages(BsonBinaryData uploadedFP, BsonBinaryData pilgrimFP)
 {
     if (uploadedFP.Equals(pilgrimFP))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }