public void TestChemObject_IChemObject() { IChemObject chemObject1 = new ChemObject(); IChemObject chemObject = new ChemObject(chemObject1); Assert.IsNotNull(chemObject); }
public virtual void TestAtomContainer_IAtomContainer() { IAtomContainer acetone = new ChemObject().Builder.NewAtomContainer(); IAtom c1 = acetone.Builder.NewAtom("C"); IAtom c2 = acetone.Builder.NewAtom("C"); IAtom o = acetone.Builder.NewAtom("O"); IAtom c3 = acetone.Builder.NewAtom("C"); acetone.Atoms.Add(c1); acetone.Atoms.Add(c2); acetone.Atoms.Add(c3); acetone.Atoms.Add(o); IBond b1 = acetone.Builder.NewBond(c1, c2, BondOrder.Single); IBond b2 = acetone.Builder.NewBond(c1, o, BondOrder.Double); IBond b3 = acetone.Builder.NewBond(c1, c3, BondOrder.Single); acetone.Bonds.Add(b1); acetone.Bonds.Add(b2); acetone.Bonds.Add(b3); IAtomContainer container = new AtomContainer(acetone); Assert.AreEqual(4, container.Atoms.Count); Assert.AreEqual(3, container.Bonds.Count); }
public void CompareDifferent() { ChemObject co1 = new ChemObject(); ChemObject co2 = new ChemObject(); co1.Id = "a1"; co2.Id = "a2"; Assert.IsFalse(co1.Compare(co2)); }
public void Compare() { ChemObject co1 = new ChemObject(); ChemObject co2 = new ChemObject(); co1.Id = "a1"; co2.Id = "a1"; Assert.IsTrue(co1.Compare(co2)); }
public void TestChemObject() { IChemObject chemObject = new ChemObject(); Assert.IsNotNull(chemObject); string value = chemObject.GetProperty <string>("hello"); Assert.IsNull(value); }
public virtual void OnStateChanged(ChemObjectChangeEventArgs evt) { ChangedObject = (ChemObject)evt.Source; }