示例#1
0
        public void CaseInsensitiveSource_CaseInsensitiveFilter()
        {
            var language = "en";
            var region   = "US";

            var lrLanguage   = new IndexerStub(language: $"{language.ToLower()}-{region.ToLower()}");
            var LRFilterFunc = Language.ToFunc($"{language.ToUpper()}-{region.ToUpper()}");

            Assert.IsTrue(LRFilterFunc(lrLanguage));

            var lRLanguage   = new IndexerStub(language: $"{language.ToLower()}-{region.ToUpper()}");
            var LrFilterFunc = Language.ToFunc($"{language.ToUpper()}-{region.ToLower()}");

            Assert.IsTrue(LrFilterFunc(lRLanguage));

            var LrLanguage   = new IndexerStub(language: $"{language.ToUpper()}-{region.ToLower()}");
            var lRFilterFunc = Language.ToFunc($"{language.ToLower()}-{region.ToUpper()}");

            Assert.IsTrue(lRFilterFunc(LrLanguage));

            var LRLanguage   = new IndexerStub(language: $"{language.ToUpper()}-{region.ToUpper()}");
            var lrFilterFunc = Language.ToFunc($"{language.ToLower()}-{region.ToLower()}");

            Assert.IsTrue(lrFilterFunc(LRLanguage));
        }
示例#2
0
        public void CaseInsensitiveFilter()
        {
            var tagId = "g1";

            var tag = new IndexerStub(tagId);

            var upperTarget = Tag.ToFunc(tagId.ToUpper());

            Assert.IsTrue(upperTarget(tag));

            var lowerTarget = Tag.ToFunc(tagId.ToLower());

            Assert.IsTrue(lowerTarget(tag));
        }
示例#3
0
        public void CaseInsensitiveSource_CaseInsensitiveFilter()
        {
            var typeId = "type-id";

            var lowerType = new IndexerStub(type: typeId.ToLower());
            var upperType = new IndexerStub(type: typeId.ToUpper());

            var upperFilterFunc = Type.ToFunc(typeId.ToUpper());

            Assert.IsTrue(upperFilterFunc(lowerType));
            Assert.IsTrue(upperFilterFunc(upperType));

            var lowerFilterFunc = Type.ToFunc(typeId.ToLower());

            Assert.IsTrue(lowerFilterFunc(lowerType));
            Assert.IsTrue(lowerFilterFunc(upperType));
        }