public virtual void TestReactions() { IReactionSet reactionSet = (IReactionSet)NewChemObject(); reactionSet.Add(reactionSet.Builder.NewReaction()); // 1 reactionSet.Add(reactionSet.Builder.NewReaction()); // 2 reactionSet.Add(reactionSet.Builder.NewReaction()); // 3 reactionSet.Add(reactionSet.Builder.NewReaction()); // 4 IEnumerator <IReaction> reactionIter = reactionSet.GetEnumerator(); Assert.IsNotNull(reactionIter); int count = 0; while (reactionIter.MoveNext()) { Assert.IsNotNull(reactionIter.Current); ++count; } Assert.AreEqual(4, count); }