Ejemplo n.º 1
0
        public override void TestClone()
        {
            IStrand strand = (IStrand)NewChemObject();
            object  clone  = strand.Clone();

            Assert.IsTrue(clone is IStrand);
        }
Ejemplo n.º 2
0
        public override ICDKObject Clone(CDKObjectMap map)
        {
            var clone = (BioPolymer)base.Clone(map);

            clone.strands = new Dictionary <string, IStrand>();
            foreach (var strandPair in strands)
            {
                string  name     = strandPair.Key;
                IStrand original = strandPair.Value;
                IStrand cloned   = (IStrand)original.Clone(map);
                clone.strands.Add(name, cloned);
            }
            return(clone);
        }