public override void TestToString() { IAminoAcid m = (IAminoAcid)NewChemObject(); IAtom nTerminus = m.Builder.NewAtom("N"); m.AddNTerminus(nTerminus); string description = m.ToString(); for (int i = 0; i < description.Length; i++) { Assert.IsTrue('\n' != description[i]); Assert.IsTrue('\r' != description[i]); } m = (IAminoAcid)NewChemObject(); IAtom cTerminus = m.Builder.NewAtom("C"); m.AddCTerminus(cTerminus); description = m.ToString(); for (int i = 0; i < description.Length; i++) { Assert.IsTrue('\n' != description[i]); Assert.IsTrue('\r' != description[i]); } }
public virtual void TestAddCTerminus_IAtom() { IAminoAcid m = (IAminoAcid)NewChemObject(); IAtom cTerminus = m.Builder.NewAtom("C"); m.AddCTerminus(cTerminus); Assert.AreEqual(cTerminus, m.CTerminus); }
public void TestRemoveAcidicOxygen_IAminoAcid() { IAminoAcid glycine = builder.NewAminoAcid(); glycine.Add(CDK.SmilesParser.ParseSmiles("C(C(=O)O)N")); Assert.AreEqual(5, glycine.Atoms.Count); glycine.AddCTerminus(glycine.Atoms[1]); AminoAcidManipulator.RemoveAcidicOxygen(glycine); Assert.AreEqual(4, glycine.Atoms.Count); }
public void TestAddAcidicOxygen_IAminoAcid() { // FIXME: I think this is the proper test, but it currently fails IAminoAcid glycine = builder.NewAminoAcid(); glycine.Add(CDK.SmilesParser.ParseSmiles("C(C=O)N")); Assert.AreEqual(4, glycine.Atoms.Count); glycine.AddCTerminus(glycine.Atoms[1]); AminoAcidManipulator.AddAcidicOxygen(glycine); Assert.AreEqual(5, glycine.Atoms.Count); }
public override void TestClone() { IAminoAcid aa = (IAminoAcid)NewChemObject(); object clone = aa.Clone(); Assert.IsTrue(clone is IAminoAcid); Assert.AreNotSame(aa, clone); aa = (IAminoAcid)NewChemObject(); IAtom nTerminus = aa.Builder.NewAtom("N"); aa.AddNTerminus(nTerminus); clone = aa.Clone(); Assert.IsTrue(clone is IAminoAcid); Assert.AreNotSame(aa, clone); aa = (IAminoAcid)NewChemObject(); IAtom cTerminus = aa.Builder.NewAtom("C"); aa.AddCTerminus(cTerminus); clone = aa.Clone(); Assert.IsTrue(clone is IAminoAcid); Assert.AreNotSame(aa, clone); }