public void TestToRemoveHeader() { string actualWordWithHeader = "comment Test Case"; string actualWordWithoutHeader = GetSeriesOfWords.RemoveHeaderFromWord(actualWordWithHeader); string expectedWordWithoutHeader = "Test Case"; Assert.Equal(actualWordWithoutHeader, expectedWordWithoutHeader); }
public void TestBuildString() { GetSeriesOfWords obj = new GetSeriesOfWords(); obj.CommentColumn.Add("Test"); obj.CommentColumn.Add("Case"); string expected = "TestCase"; string actual = GetSeriesOfWords.BuildString(obj); Assert.Equal(expected, actual); }
public void TestGetSeriesOfWords() { string test = "0"; byte[] byteArray = Encoding.ASCII.GetBytes(test); MemoryStream stream = new MemoryStream(byteArray); StreamReader reader = new StreamReader(stream); //string test = "0"; //StreamReader input = new StreamReader(test); Console.SetIn(reader); string[] actualWord = GetSeriesOfWords.ConvertCommentsToWords(_path); //string[] seriesOfWord = { "what", "does", "this", "help", "with" }; Assert.Equal("what", actualWord[0]); Assert.Equal("does", actualWord[1]); }
public void TestIfReadingFromCsvIsCorrectForm() { Assert.True(GetSeriesOfWords.ReadingFromCsvFile(_path, new GetSeriesOfWords())); }