コード例 #1
0
        public void KeysWithDifferentContentAreNotEqual()
        {
            var key1 = new RedisKey("test1");
            var key2 = new RedisKey("test2");

            Assert.False(key1.Equals(key2));
            Assert.False(key2.Equals(key1));

            Assert.True(key1 != key2);
            Assert.True(key2 != key1);
        }
コード例 #2
0
        public void BulkStringsWithSameContentAreEqual()
        {
            var key1 = new RedisKey("test");
            var key2 = new RedisKey("test");

            Assert.True(key1.Equals(key2));
            Assert.True(key2.Equals(key1));

            Assert.True(key1 == key2);
            Assert.True(key2 == key1);
        }
コード例 #3
0
        public void KeysAreNotEqualToNull()
        {
            var key = new RedisKey("test");

            Assert.False(key.Equals(null));
        }
コード例 #4
0
        public void KeysAreEqualToItself()
        {
            var key = new RedisKey("test");

            Assert.True(key.Equals(key));
        }