public virtual void TestPropagation() { ChemFile cf = new ChemFile(); ChemSequence cs = new ChemSequence(); ChemModel cm = new ChemModel(); IChemObjectSet <IAtomContainer> som = new ChemObjectSet <IAtomContainer>(); var mol = new AtomContainer(); Atom a1 = new Atom("C"); Atom a2 = new Atom("C"); Bond b1 = new Bond(a1, a2); mol.Atoms.Add(a1); mol.Atoms.Add(a2); mol.Bonds.Add(b1); som.Add(mol); cm.MoleculeSet = som; cs.Add(cm); cf.Add(cs); TestListener ts = new TestListener(); cf.Listeners.Add(ts); a2.Symbol = "N"; Assert.IsInstanceOfType(ts.ChangedObject, typeof(Atom)); Assert.AreEqual("N", ((Atom)ts.ChangedObject).Symbol); }
public void TestChemSequence() { IChemSequence cs = new ChemSequence(); Assert.IsNotNull(cs); }