Example #1
0
 public void Test5()
 {
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  '  "));
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  '''  "));
 }
Example #2
0
 public void SampleTests()
 {
     Assert.AreEqual(new List <string> {
         "e", "d", "a"
     }, TopWords.Top3("a a a  b  c c  d d d d  e e e e e"));
     Assert.AreEqual(new List <string> {
         "e", "ddd", "aa"
     }, TopWords.Top3("e e e e DDD ddd DdD: ddd ddd aa aA Aa, bb cc cC e e e"));
     Assert.AreEqual(new List <string> {
         "won't", "wont"
     }, TopWords.Top3("  //wont won't won't "));
     Assert.AreEqual(new List <string> {
         "e"
     }, TopWords.Top3("  , e   .. "));
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  ...  "));
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  '  "));
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  '''  "));
     Assert.AreEqual(new List <string> {
         "a", "of", "on"
     }, TopWords.Top3(
                         string.Join("\n", new string[] { "In a village of La Mancha, the name of which I have no desire to call to",
                                                          "mind, there lived not long since one of those gentlemen that keep a lance",
                                                          "in the lance-rack, an old buckler, a lean hack, and a greyhound for",
                                                          "coursing. An olla of rather more beef than mutton, a salad on most",
                                                          "nights, scraps on Saturdays, lentils on Fridays, and a pigeon or so extra",
                                                          "on Sundays, made away with three-quarters of his income." })));
 }
Example #3
0
 public void Test1()
 {
     Assert.AreEqual(new List <string> {
         "e", "d", "a"
     }, TopWords.Top3("a a a  b  c c  d d d d  e e e e e"));
     Assert.AreEqual(new List <string> {
         "e", "ddd", "aa"
     }, TopWords.Top3("e e e e DDD ddd DdD: ddd ddd aa aA Aa, bb cc cC e e e"));
     Assert.AreEqual(new List <string> {
         "won't", "wont"
     }, TopWords.Top3("  //wont won't won't "));
 }
Example #4
0
 public void TestLongText()
 {
     Assert.AreEqual(new List <string> {
         "a", "of", "on"
     }, TopWords.Top3(
                         string.Join("\n", new string[] { "In a village of La Mancha, the name of which I have no desire to call to",
                                                          "mind, there lived not long since one of those gentlemen that keep a lance",
                                                          "in the lance-rack, an old buckler, a lean hack, and a greyhound for",
                                                          "coursing. An olla of rather more beef than mutton, a salad on most",
                                                          "nights, scraps on Saturdays, lentils on Fridays, and a pigeon or so extra",
                                                          "on Sundays, made away with three-quarters of his income." })));
 }
Example #5
0
 public void TestWeird1()
 {
     Assert.AreEqual(new List <string> {
     }, TopWords.Top3("  ...  "));
 }
Example #6
0
 public void Test4()
 {
     Assert.AreEqual(new List <string> {
         "e"
     }, TopWords.Top3("  , e   .. "));
 }
Example #7
0
 public void Test3()
 {
     Assert.AreEqual(new List <string> {
         "e", "ddd", "aa"
     }, TopWords.Top3("e e e e DDD ddd DdD: ddd ddd aa aA Aa, bb cc cC e e e"));
 }
Example #8
0
 public void Test2()
 {
     Assert.AreEqual(new List <string> {
         "won't", "wont"
     }, TopWords.Top3("  //wont won't won't "));
 }
Example #9
0
 public void Test1()
 {
     Assert.AreEqual(new List <string> {
         "e", "d", "a"
     }, TopWords.Top3("a a a  b  c c  d d d d  e e e e e"));
 }