public override void TestClone() { IReaction reaction = (IReaction)NewChemObject(); object clone = reaction.Clone(); Assert.IsNotNull(clone); Assert.IsTrue(clone is IReaction); }
public virtual void TestClone_Mapping() { IReaction reaction = (IReaction)NewChemObject(); IMapping mapping = reaction.Builder.NewMapping( reaction.Builder.NewAtom("C"), reaction.Builder.NewAtom("C")); reaction.Mappings.Add(mapping); IReaction clonedReaction = (IReaction)reaction.Clone(); IEnumerator <IMapping> mappings = reaction.Mappings.GetEnumerator(); IEnumerator <IMapping> clonedMappings = clonedReaction.Mappings.GetEnumerator(); Assert.IsNotNull(mappings); Assert.IsTrue(mappings.MoveNext()); Assert.IsNotNull(clonedMappings); Assert.IsTrue(clonedMappings.MoveNext()); }