public void CastAsNewSet() { object[] starting = new object[3] { 1, 2, 3 }; Set<object> set = new Set<object>(starting); Assert.AreEqual(3, set.Count, "Set should have three items in it."); Set<int> ending = set.CastAsNewSet<int>(); Assert.AreEqual(3, ending.Count, "Set should have three items in it."); foreach (int startInt in starting) { Assert.IsTrue(ending.Contains(startInt), "Set should have same three items in it."); } }