private void CheckH2(CollectionHolder holder) { Assert.AreEqual("h1", ((CollectionHolder)holder.Map()["key"]).Name()); Assert.AreEqual("h1", ((CollectionHolder)holder.Map()[holder]).Name()); Assert.AreEqual("two", holder.List()[0]); Assert.AreEqual("h1", ((CollectionHolder)holder.List()[1]).Name()); Assert.AreEqual(holder, holder.List()[2]); Assert.IsTrue(holder.Set().Remove("two")); Assert.IsTrue(holder.Set().Remove(holder)); CollectionHolder remaining = NextCollectionHolder(holder.Set().GetEnumerator()); Assert.AreEqual("h1", remaining.Name()); }
private void Check(CollectionHolder holder, CollectionHolder original1, CollectionHolder original2) { Assert.IsTrue(holder != original1); Assert.IsTrue(holder != original2); if (holder.Name().Equals("h1")) { CheckH1(holder); } else { CheckH2(holder); } }