public void TestReadFilewithWordsinColons() { List<String> actual = new List<String>(); List<String> expected = new List<String>(); // this is not the proper way but I couldn't findhow to find a file string path = Environment.CurrentDirectory + "/../../tests/word1count1.txt"; ReadFile file_reader = new ReadFile(path); foreach (string word in file_reader.getWord()) { actual.Add(word); } expected.Add("word1"); expected.Add("word2"); Assert.AreEqual(expected, actual, "expected :" + expected + " did not match actual :" + actual); }