Easy.Test/Text/WordCountTest.cs
/// <summary>
/// Tests word count on a large text
/// </summary>
Tests word count on a large text
Tests word count on a large text
[TestMethod]
        public void TestLargeWordCount()
        {
            StringBuilder text = new StringBuilder();
            const int Words = 2000;
            for (int i = 0; i < Words; i++)
            {
                text.Append(" ");
                text.Append("word");
                text.Append(i);
            }
            Assert.AreEqual(Words, GetWordCount(text.ToString()));
        }
[ TestMethod ] public void TestLargeWordCount ( ) { StringBuilder text = new StringBuilder ( ) ; const int Words = 2000 ; for ( int i = 0 ; i < Words ; i ++ ) { text . Append ( " " ) ; text . Append ( " " ) ; text . Append ( i ) ; } Assert . AreEqual ( Words , GetWordCount ( text . ToString ( ) ) ) ; }
Tests word count on a large text
Tests word count on a large text
// Generate words