public void TestMethod2() { PrefixTree T = new PrefixTree(); T.AddValue("abracadabra"); T.AddValue("abbar"); T.AddValue("abce"); T.AddValue("sort"); T.AddValue("sortset"); T.Remove("sort"); T.Remove("abce"); List <string> res = new List <string>(); T.AllToList(ref res); List <string> trueAnswer = new List <string>(); trueAnswer.Add("abbar"); trueAnswer.Add("abracadabra"); trueAnswer.Add("sortset"); CollectionAssert.AreEqual(res, trueAnswer); }