コード例 #1
0
        public override void TestClone()
        {
            ISingleElectron radical = (ISingleElectron)NewChemObject();
            object          clone   = radical.Clone();

            Assert.IsNotNull(clone);
            Assert.IsTrue(clone is ISingleElectron);
        }
コード例 #2
0
        public virtual void TestClone_IAtom()
        {
            ISingleElectron radical = (ISingleElectron)NewChemObject();
            IAtom           atom    = radical.Builder.NewAtom("N");

            radical.Atom = atom;

            // test cloning of atom
            ISingleElectron clone = (ISingleElectron)radical.Clone();

            Assert.AreNotSame(atom, clone.Atom);
        }