Ejemplo n.º 1
0
        public void TestWhenCommentIsGivenAsInputReturnSeriesOfWords()
        {
            //columnfilter
            string Comment = "No new Comment";

            string[] words             = ConvertLineToTheSeriesOfWords.ConvertLineToSeriesOfWords(Comment);
            string[] actualSeriesWords = { "No", "new", "Comment" };
            Assert.True(words[0] == actualSeriesWords[0] && words[1] == actualSeriesWords[1] && words[2] == actualSeriesWords[2]);
        }
Ejemplo n.º 2
0
        public static string[] ApplyColumnFilter(string line, int startcolumn, int stopcolumn)
        {
            string[] columns = line.Split(',');
            for (int columnNumber = startcolumn; columnNumber < stopcolumn; columnNumber++)
            {
                string reviewComment = columns[columnNumber];

                string[] words = ConvertLineToTheSeriesOfWords.ConvertLineToSeriesOfWords(reviewComment);
                foreach (var word in words)
                {
                    System.Console.WriteLine(word);
                }
            }
            return(columns);//Test
        }