Example #1
0
        public void EqualsIndependentOfCase()
        {
            var module = "Module";
            var item   = "Item";

            var sampleKey = new UriModuleItemResolverKey(module, item);
            var upperKey  = new UriModuleItemResolverKey(module.ToUpper(), item.ToUpper());
            var lowerKey  = new UriModuleItemResolverKey(module.ToLower(), item.ToLower());

            Assert.AreEqual(sampleKey, upperKey);
            Assert.AreEqual(sampleKey.GetHashCode(), upperKey.GetHashCode());

            Assert.AreEqual(sampleKey, lowerKey);
            Assert.AreEqual(sampleKey.GetHashCode(), lowerKey.GetHashCode());

            Assert.AreEqual(upperKey, lowerKey);
            Assert.AreEqual(upperKey.GetHashCode(), lowerKey.GetHashCode());
        }
Example #2
0
        public void EqualsIndependentOfCase()
        {
            var module = "Module";
            var item   = "Item";

            var sampleKey = new UriModuleItemResolverKey(module, item);
            var upperKey  = new UriModuleItemResolverKey(module.ToUpper(), item.ToUpper());
            var lowerKey  = new UriModuleItemResolverKey(module.ToLower(), item.ToLower());

            sampleKey.Should().Be(upperKey);
            sampleKey.GetHashCode().Should().Be(upperKey.GetHashCode());

            sampleKey.Should().Be(lowerKey);
            sampleKey.GetHashCode().Should().Be(lowerKey.GetHashCode());

            upperKey.Should().Be(lowerKey);
            upperKey.GetHashCode().Should().Be(lowerKey.GetHashCode());
        }