public static ForName ( string name, string>.IDictionary |
||
name | string | |
args | string>.IDictionary | |
return |
public virtual void TestBogusLookupTokenizer() { try { TokenizerFactory.ForName("sdfsdfsdfdsfsdfsdf", new Dictionary <string, string>()); fail(); } catch (Exception expected) when(expected.IsIllegalArgumentException()) { // } try { TokenizerFactory.ForName("!(**#$U*#$*", new Dictionary <string, string>()); fail(); } catch (Exception expected) when(expected.IsIllegalArgumentException()) { // } }
public virtual void TestBogusLookupTokenizer() { try { TokenizerFactory.ForName("sdfsdfsdfdsfsdfsdf", new Dictionary <string, string>()); fail(); } catch (System.ArgumentException) { // } try { TokenizerFactory.ForName("!(**#$U*#$*", new Dictionary <string, string>()); fail(); } catch (System.ArgumentException) { // } }
public virtual void TestLookupTokenizer() { assertSame(typeof(WhitespaceTokenizerFactory), TokenizerFactory.ForName("Whitespace", VersionArgOnly()).GetType()); assertSame(typeof(WhitespaceTokenizerFactory), TokenizerFactory.ForName("WHITESPACE", VersionArgOnly()).GetType()); assertSame(typeof(WhitespaceTokenizerFactory), TokenizerFactory.ForName("whitespace", VersionArgOnly()).GetType()); }