public void getWordSurroundingTest() { string testResult = ""; string Content = "this are very tight text"; string word = "this"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "are"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "ver"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "text"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; Content = "long long long long long long this are very tight text long long long long long long"; word = "this"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "are"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "ver"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length) + '\n'; word = "text"; testResult += FilterPolicy.getWordSurrounding(Content, Content.IndexOf(word), word.Length); Console.Write(testResult); }