ForName() 공개 정적인 메소드

looks up a tokenizer by name from context classpath
public static ForName ( string name, string>.IDictionary args ) : TokenizerFactory
name string
args string>.IDictionary
리턴 TokenizerFactory
예제 #1
0
        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())
            {
                //
            }
        }
예제 #2
0
        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)
            {
                //
            }
        }
예제 #3
0
 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());
 }