示例#1
0
        public void CompareTo_should_return_expected_result(long value1, long?value2, int expectedResult)
        {
            var subject = new BsonTimestamp(value1);
            var other   = value2 == null ? null : new BsonTimestamp(value2.Value);

            var result1 = subject.CompareTo(other);
            var result2 = subject.CompareTo((BsonValue)other);

            result1.Should().Be(expectedResult);
            result2.Should().Be(expectedResult);
        }
示例#2
0
        public void CompareTo_should_return_expected_result(long value1, long? value2, int expectedResult)
        {
            var subject = new BsonTimestamp(value1);
            var other = value2 == null ? null : new BsonTimestamp(value2.Value);

            var result1 = subject.CompareTo(other);
            var result2 = subject.CompareTo((BsonValue)other);

            result1.Should().Be(expectedResult);
            result2.Should().Be(expectedResult);
        }
示例#3
0
        public void CompareTo_should_return_plus_one_when_other_type_compares_lower()
        {
            var subject = new BsonTimestamp(0);

            var result = subject.CompareTo(BsonMinKey.Value);

            result.Should().Be(1);
        }
示例#4
0
        public void CompareTo_should_return_plus_one_when_other_type_compares_lower()
        {
            var subject = new BsonTimestamp(0);

            var result = subject.CompareTo(BsonMinKey.Value);

            result.Should().Be(1);
        }