Exemple #1
0
        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]);
            }
        }
Exemple #2
0
        public virtual void TestAddNTerminus_IAtom()
        {
            IAminoAcid m         = (IAminoAcid)NewChemObject();
            IAtom      nTerminus = m.Builder.NewAtom("N");

            m.AddNTerminus(nTerminus);
            Assert.AreEqual(nTerminus, m.NTerminus);
        }
Exemple #3
0
        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);
        }