Пример #1
0
        public void CreateFilter_RegexString_ShouldMatchTheTestedString(string filterString, string testedString)
        {
            var filter = ScriptProviderHelper.CreateFilter(filterString);

            var result = filter(testedString);

            result.Should().BeTrue();
        }
Пример #2
0
        public void CreateFilter_WildcardString_ShouldNotMatchTheTestedString(string filterString, string testedString)
        {
            var filter = ScriptProviderHelper.CreateFilter(filterString);

            var result = filter(testedString);

            result.Should().BeFalse();
        }
Пример #3
0
        public void CreateFilter_GeneralString_ShouldMatchTheSameStringInTheDifferentLetterCase()
        {
            var filter = ScriptProviderHelper.CreateFilter("script.sql");

            var result = filter("Script.SQL");

            result.Should().BeTrue();
        }
Пример #4
0
        public void CreateFilter_GeneralString_ShouldNotMatchTheSubstring()
        {
            var filter = ScriptProviderHelper.CreateFilter("script.sql");

            var result = filter("script");

            result.Should().BeFalse();
        }
Пример #5
0
        public void CreateFilter_NullOrWhiteSpaceString_ShouldReturnNull()
        {
            var filter = ScriptProviderHelper.CreateFilter("  ");

            filter.Should().BeNull();

            filter = ScriptProviderHelper.CreateFilter(null);
            filter.Should().BeNull();
        }