public virtual void TestAddAtom_IAtom_IMonomer() { IStrand oStrand = (IStrand)NewChemObject(); IMonomer oMono1 = oStrand.Builder.NewMonomer(); oMono1.MonomerName = "TRP279"; IAtom oAtom1 = oStrand.Builder.NewAtom("C"); IAtom oAtom2 = oStrand.Builder.NewAtom("C"); IAtom oAtom3 = oStrand.Builder.NewAtom("C"); oStrand.AddAtom(oAtom1); oStrand.AddAtom(oAtom2); oStrand.AddAtom(oAtom3, oMono1); Assert.AreEqual(2, oStrand.GetMonomer("").Atoms.Count); Assert.AreEqual(1, oStrand.GetMonomer("TRP279").Atoms.Count); }
public virtual void TestGetMonomer_String() { IStrand oStrand = (IStrand)NewChemObject(); IMonomer oMono1 = oStrand.Builder.NewMonomer(); oMono1.MonomerName = "TRP279"; IMonomer oMono2 = oStrand.Builder.NewMonomer(); oMono2.MonomerName = "HOH"; IAtom oAtom2 = oStrand.Builder.NewAtom("C"); IAtom oAtom3 = oStrand.Builder.NewAtom("C"); oStrand.AddAtom(oAtom2, oMono1); oStrand.AddAtom(oAtom3, oMono2); Assert.AreEqual(oMono1, oStrand.GetMonomer("TRP279")); Assert.AreEqual(oMono2, oStrand.GetMonomer("HOH")); Assert.IsNull(oStrand.GetMonomer("TEST")); }