Exemplo n.º 1
0
        public void CompareTo_null_should_return_expected_result()
        {
            var subject = new BsonInt64(0);

            var result1 = subject.CompareTo((BsonInt64)null);
            var result2 = subject.CompareTo((BsonValue)null);

            result1.Should().Be(1);
            result2.Should().Be(1);
        }
        public void CompareTo_BsonInt64_should_return_expected_result(long int64Value, long otherInt64Value, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other = new BsonInt64(otherInt64Value);

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

            result1.Should().Be(expectedResult);
            result2.Should().Be(expectedResult);
        }
Exemplo n.º 3
0
        public void CompareTo_BsonInt64_should_return_expected_result(long int64Value, long otherInt64Value, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other   = new BsonInt64(otherInt64Value);

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

            result1.Should().Be(expectedResult);
            result2.Should().Be(expectedResult);
        }
        public void CompareTo_BsonInt32_should_return_expected_result(long int64Value, int otherInt32Value, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other = new BsonInt32(otherInt32Value);

            var result = subject.CompareTo(other);

            result.Should().Be(expectedResult);
        }
        public void CompareTo_BsonDecimal128_should_return_expected_result(long int64Value, double otherDoubleValue, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other = new BsonDecimal128((Decimal128)(decimal)otherDoubleValue);

            var result = subject.CompareTo(other);

            result.Should().Be(expectedResult);
        }
Exemplo n.º 6
0
        public void CompareTo_BsonInt32_should_return_expected_result(long int64Value, int otherInt32Value, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other   = new BsonInt32(otherInt32Value);

            var result = subject.CompareTo(other);

            result.Should().Be(expectedResult);
        }
Exemplo n.º 7
0
        public void CompareTo_BsonDecimal128_should_return_expected_result(long int64Value, double otherDoubleValue, int expectedResult)
        {
            var subject = new BsonInt64(int64Value);
            var other   = new BsonDecimal128((Decimal128)(decimal)otherDoubleValue);

            var result = subject.CompareTo(other);

            result.Should().Be(expectedResult);
        }
        public void CompareTo_null_should_return_expected_result()
        {
            var subject = new BsonInt64(0);

            var result1 = subject.CompareTo((BsonInt64)null);
            var result2 = subject.CompareTo((BsonValue)null);

            result1.Should().Be(1);
            result2.Should().Be(1);
        }