public virtual void TestIncludeOrig() { b = new SynonymMap.Builder(true); const bool keepOrig = true; Add("a b", "ab", keepOrig); Add("a c", "ac", keepOrig); Add("a", "aa", keepOrig); Add("b", "bb", keepOrig); Add("z x c v", "zxcv", keepOrig); Add("x c", "xc", keepOrig); SynonymMap map = b.Build(); Analyzer a = new AnalyzerAnonymousInnerClassHelper11(this, map); AssertAnalyzesTo(a, "$", new string[] { "$" }, new int[] { 1 }); AssertAnalyzesTo(a, "a", new string[] { "a", "aa" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "a", new string[] { "a", "aa" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "$ a", new string[] { "$", "a", "aa" }, new int[] { 1, 1, 0 }); AssertAnalyzesTo(a, "a $", new string[] { "a", "aa", "$" }, new int[] { 1, 0, 1 }); AssertAnalyzesTo(a, "$ a !", new string[] { "$", "a", "aa", "!" }, new int[] { 1, 1, 0, 1 }); AssertAnalyzesTo(a, "a a", new string[] { "a", "aa", "a", "aa" }, new int[] { 1, 0, 1, 0 }); AssertAnalyzesTo(a, "b", new string[] { "b", "bb" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "z x c v", new string[] { "z", "zxcv", "x", "c", "v" }, new int[] { 1, 0, 1, 1, 1 }); AssertAnalyzesTo(a, "z x c $", new string[] { "z", "x", "xc", "c", "$" }, new int[] { 1, 1, 0, 1, 1 }); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testIncludeOrig() throws Exception public virtual void testIncludeOrig() { b = new SynonymMap.Builder(true); const bool keepOrig = true; add("a b", "ab", keepOrig); add("a c", "ac", keepOrig); add("a", "aa", keepOrig); add("b", "bb", keepOrig); add("z x c v", "zxcv", keepOrig); add("x c", "xc", keepOrig); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final SynonymMap map = b.build(); SynonymMap map = b.build(); Analyzer a = new AnalyzerAnonymousInnerClassHelper11(this, map); assertAnalyzesTo(a, "$", new string[] {"$"}, new int[] {1}); assertAnalyzesTo(a, "a", new string[] {"a", "aa"}, new int[] {1, 0}); assertAnalyzesTo(a, "a", new string[] {"a", "aa"}, new int[] {1, 0}); assertAnalyzesTo(a, "$ a", new string[] {"$", "a", "aa"}, new int[] {1, 1, 0}); assertAnalyzesTo(a, "a $", new string[] {"a", "aa", "$"}, new int[] {1, 0, 1}); assertAnalyzesTo(a, "$ a !", new string[] {"$", "a", "aa", "!"}, new int[] {1, 1, 0, 1}); assertAnalyzesTo(a, "a a", new string[] {"a", "aa", "a", "aa"}, new int[] {1, 0, 1, 0}); assertAnalyzesTo(a, "b", new string[] {"b", "bb"}, new int[] {1, 0}); assertAnalyzesTo(a, "z x c v", new string[] {"z", "zxcv", "x", "c", "v"}, new int[] {1, 0, 1, 1, 1}); assertAnalyzesTo(a, "z x c $", new string[] {"z", "x", "xc", "c", "$"}, new int[] {1, 1, 0, 1, 1}); }
public virtual void TestIncludeOrig() { b = new SynonymMap.Builder(true); const bool keepOrig = true; Add("a b", "ab", keepOrig); Add("a c", "ac", keepOrig); Add("a", "aa", keepOrig); Add("b", "bb", keepOrig); Add("z x c v", "zxcv", keepOrig); Add("x c", "xc", keepOrig); SynonymMap map = b.Build(); Analyzer a = new AnalyzerAnonymousInnerClassHelper11(this, map); AssertAnalyzesTo(a, "$", new string[] { "$" }, new int[] { 1 }); AssertAnalyzesTo(a, "a", new string[] { "a", "aa" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "a", new string[] { "a", "aa" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "$ a", new string[] { "$", "a", "aa" }, new int[] { 1, 1, 0 }); AssertAnalyzesTo(a, "a $", new string[] { "a", "aa", "$" }, new int[] { 1, 0, 1 }); AssertAnalyzesTo(a, "$ a !", new string[] { "$", "a", "aa", "!" }, new int[] { 1, 1, 0, 1 }); AssertAnalyzesTo(a, "a a", new string[] { "a", "aa", "a", "aa" }, new int[] { 1, 0, 1, 0 }); AssertAnalyzesTo(a, "b", new string[] { "b", "bb" }, new int[] { 1, 0 }); AssertAnalyzesTo(a, "z x c v", new string[] { "z", "zxcv", "x", "c", "v" }, new int[] { 1, 0, 1, 1, 1 }); AssertAnalyzesTo(a, "z x c $", new string[] { "z", "x", "xc", "c", "$" }, new int[] { 1, 1, 0, 1, 1 }); }