public virtual void TestRemoveReaction_IReaction() { IReactionSet reactionSet = (IReactionSet)NewChemObject(); IReaction reaction = reactionSet.Builder.NewReaction(); reaction.Id = "1"; reactionSet.Add(reaction); IReaction relevantReaction = reactionSet.Builder.NewReaction(); relevantReaction.Id = "2"; reactionSet.Add(relevantReaction); Assert.AreEqual(2, reactionSet.Count); reactionSet.Remove(relevantReaction); Assert.AreEqual(1, reactionSet.Count); Assert.AreEqual("1", reactionSet[0].Id); reactionSet.Add(relevantReaction); reactionSet.Add(relevantReaction); Assert.AreEqual(3, reactionSet.Count); reactionSet.Remove(relevantReaction); Assert.AreEqual(1, reactionSet.Count); Assert.AreEqual("1", reactionSet[0].Id); }