예제 #1
0
        public virtual void TestIsEmpty()
        {
            IReactionSet set = (IReactionSet)NewChemObject();

            Assert.IsTrue(set.IsEmpty(), "new reaction set should be empty");

            set.Add(set.Builder.NewReaction());

            Assert.IsFalse(set.IsEmpty(), "reaction set with a single reaction should not be empty");

            set.Clear();

            Assert.IsTrue(set.IsEmpty(), "reaction set with all reactions removed should be empty");
        }
예제 #2
0
 /// <inheritdoc/>
 public bool IsEmpty()
 => (setOfMolecules == null || setOfMolecules.IsEmpty()) &&
 (setOfReactions == null || setOfReactions.IsEmpty()) &&
 (ringSet == null || ringSet.IsEmpty()) &&
 (crystal == null || crystal.IsEmpty());