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);
        }
Beispiel #2
0
        public void TestChemFile()
        {
            IChemFile cs = new ChemFile();

            Assert.IsNotNull(cs);
        }