public void Contains() { var collection = new InstanceCollectionInt32 <Instance>(); var instance = new Instance(); int id = collection.Add(instance); Assert.IsTrue(collection.Contains(id), "collection.Contains(id)"); collection.Remove(id); Assert.IsFalse(collection.Contains(id), "collection.Contains(id)"); }
public void Add() { var collection = new InstanceCollectionInt32 <Instance>(); var instance = new Instance(); int id = collection.Add(instance); Assert.AreEqual(id, collection.Generator.PreviousIdentifier); Assert.IsTrue(collection.Contains(id), "collection.Contains(id)"); Assert.IsTrue(collection.Generator.IsValid(id), "collection.Generator.IsValid(id)"); }