public void Finds1_Params() { string source = "hello world"; bool result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, 'h', 'x'); Assert.IsTrue(result); }
public void FalseIsSourceIsEmpty() { string source = string.Empty; bool result = SrkStringExtensions.ContainsAny(source, StringComparison.CurrentCulture, new string[] { string.Empty, }); Assert.IsFalse(result); }
public void Finds1CaseIgnore() { string source = "Hello World"; var values = new char[] { 'h', 'x', }; bool result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCultureIgnoreCase, values); Assert.IsTrue(result); }
public void Finds2() { string source = "hello world"; var values = new char[] { 'x', 'w', }; bool result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, values); Assert.IsTrue(result); }
public void Finds1CaseMatch() { string source = "Hello World"; var values = new string[] { "hello", "guys", }; bool result = SrkStringExtensions.ContainsAny(source, StringComparison.InvariantCulture, values); Assert.IsFalse(result); }
public void ThrowsIfArg0IsNull() { SrkStringExtensions.ContainsAny(null, StringComparison.CurrentCulture, new char[0]); }