public virtual void TestReplace() { Collection4 c = new Collection4(); c.Replace("one", "two"); c.Add("one"); c.Add("two"); c.Add("three"); c.Replace("two", "two.half"); AssertCollection(new string[] { "one", "two.half", "three" }, c); c.Replace("two.half", "one"); c.Replace("one", "half"); AssertCollection(new string[] { "half", "one", "three" }, c); }