Example #1
0
        public void VerifyKeyRangeNotEquals4()
        {
            var keyrange1 = new KeyRange <int>(Key <int> .CreateKey(1, true), Key <int> .CreateKey(2, true));
            var keyrange2 = new KeyRange <int>(Key <int> .CreateKey(1, true), Key <int> .CreateKey(2, false));

            EqualityAsserts.TestEqualsAndHashCode(keyrange1, keyrange2, false);
        }
Example #2
0
        public void VerifyKeyRangeEqualsSameMinValues()
        {
            var keyrange1 = new KeyRange <int>(Key <int> .CreateKey(1, true), null);
            var keyrange2 = new KeyRange <int>(Key <int> .CreateKey(1, true), null);

            EqualityAsserts.TestEqualsAndHashCode(keyrange1, keyrange2, true);
        }
Example #3
0
        public void VerifyKeyRangeInequality3()
        {
            var keyrange1 = new KeyRange <int>(null, null);
            var keyrange2 = new KeyRange <int>(null, Key <int> .CreateKey(2, true));

            EqualityAsserts.TestEqualsAndHashCode(keyrange1, keyrange2, false);
        }
Example #4
0
        public void VerifyOpenKeyRangesAreEqual()
        {
            var keyrange1 = new KeyRange <int>(null, null);
            var keyrange2 = new KeyRange <int>(null, null);

            EqualityAsserts.TestEqualsAndHashCode(keyrange1, keyrange2, true);
        }
Example #5
0
        public void VerifyKeyNotEqualPrefixKey()
        {
            var key1 = Key <string> .CreateKey("foo", true);

            var key2 = Key <string> .CreatePrefixKey("foo");

            EqualityAsserts.TestEqualsAndHashCode(key1, key2, false);
        }
Example #6
0
        public void VerifyKeyNotEqualDifferentInclusive()
        {
            var key1 = Key <int> .CreateKey(2, true);

            var key2 = Key <int> .CreateKey(2, false);

            EqualityAsserts.TestEqualsAndHashCode(key1, key2, false);
        }
Example #7
0
        public void VerifyKeyEqualsSameValue()
        {
            var key1 = Key <int> .CreateKey(1, true);

            var key2 = Key <int> .CreateKey(1, true);

            EqualityAsserts.TestEqualsAndHashCode(key1, key2, true);
        }
Example #8
0
        public void VerifyKeyNotEqualDifferentValue()
        {
            var key1 = Key <int> .CreateKey(3, false);

            var key2 = Key <int> .CreateKey(4, false);

            EqualityAsserts.TestEqualsAndHashCode(key1, key2, false);
        }
Example #9
0
        public void VerifyDifferentEmptyStringKeyRangesAreEqual()
        {
            var keyRange = new KeyRange <long>(Key <long> .CreateKey(5, false), Key <long> .CreateKey(5, false));

            EqualityAsserts.TestEqualsAndHashCode(KeyRange <long> .EmptyRange, keyRange, true);
        }
Example #10
0
 public void VerifyEmptyStringKeyRangesAreEqual()
 {
     EqualityAsserts.TestEqualsAndHashCode(KeyRange <string> .EmptyRange, KeyRange <string> .EmptyRange, true);
 }
Example #11
0
        public void VerifyKeyRangeEqualsSelf()
        {
            var keyrange = new KeyRange <int>(Key <int> .CreateKey(1, true), Key <int> .CreateKey(2, false));

            EqualityAsserts.TestEqualsAndHashCode(keyrange, keyrange, true);
        }
Example #12
0
        public void VerifyKeyEqualsSelf()
        {
            var key = Key <int> .CreateKey(0, false);

            EqualityAsserts.TestEqualsAndHashCode(key, key, true);
        }