Ejemplo n.º 1
0
        public virtual void TestRelatedChemObjects()
        {
            IChemObject obj     = NewChemObject();
            IAtom       atom0   = obj.Builder.NewAtom();
            IAtom       atom1   = obj.Builder.NewAtom();
            IMapping    mapping = obj.Builder.NewMapping(atom0, atom1);

            IEnumerator <IChemObject> iter = mapping.GetRelatedChemObjects().GetEnumerator();

            Assert.IsTrue(iter.MoveNext());
            Assert.AreEqual(atom0, (IAtom)iter.Current);
            Assert.IsTrue(iter.MoveNext());
            Assert.AreEqual(atom1, (IAtom)iter.Current);
            Assert.IsFalse(iter.MoveNext());
        }