public void TestBsonDateTimeEquals()
        {
            var a = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 1, DateTimeKind.Utc));
            var b = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 1, DateTimeKind.Utc));
            var c = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 2, DateTimeKind.Utc));
            var n = (BsonDateTime)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 TestBsonDateTimeEquals()
        {
            var a = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 1, DateTimeKind.Utc));
            var b = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 1, DateTimeKind.Utc));
            var c = new BsonDateTime(new DateTime(2011, 10, 12, 15, 13, 2, DateTimeKind.Utc));
            var n = (BsonDateTime)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);
        }