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); }
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); }
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); }