Esempio n. 1
0
            public void Finds1_Params()
            {
                string source = "hello world";
                bool   result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, 'h', 'x');

                Assert.IsTrue(result);
            }
Esempio n. 2
0
            public void FalseIsSourceIsEmpty()
            {
                string source = string.Empty;
                bool   result = SrkStringExtensions.ContainsAny(source, StringComparison.CurrentCulture, new string[] { string.Empty, });

                Assert.IsFalse(result);
            }
Esempio n. 3
0
            public void Finds1CaseIgnore()
            {
                string source = "Hello World";
                var    values = new char[] { 'h', 'x', };
                bool   result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCultureIgnoreCase, values);

                Assert.IsTrue(result);
            }
Esempio n. 4
0
            public void Finds2()
            {
                string source = "hello world";
                var    values = new char[] { 'x', 'w', };
                bool   result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, values);

                Assert.IsTrue(result);
            }
Esempio n. 5
0
            public void Finds1CaseMatch()
            {
                string source = "Hello World";
                var    values = new string[] { "hello", "guys", };
                bool   result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, values);

                Assert.IsFalse(result);
            }
Esempio n. 6
0
 public void ThrowsIfArg0IsNull()
 {
     SrkStringExtensions.ContainsAny(null, StringComparison.CurrentCulture, new char[0]);
 }