Ejemplo n.º 1
0
        public virtual void TestAdd_IAtomContainer()
        {
            var container = new ConformerContainer(confs);

            base_.Title = "junk";
            container.Add(base_);
        }
Ejemplo n.º 2
0
        public virtual void TestAddAll_Collection()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            Assert.IsTrue(container.Contains(container[3]));
        }
Ejemplo n.º 3
0
        public virtual void TestContains_Object()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            Assert.IsTrue(container.Contains(container[3]));
        }
Ejemplo n.º 4
0
        public virtual void TestConformerContainer_arrayIAtomContainer()
        {
            var container = new ConformerContainer(confs);

            Assert.IsNotNull(container);
            Assert.AreEqual(nconfs, container.Count());
        }
Ejemplo n.º 5
0
        public virtual void TestConformerContainer_IAtomContainer()
        {
            var container = new ConformerContainer(base_);

            Assert.IsNotNull(container);
            Assert.AreEqual(1, container.Count());
        }
Ejemplo n.º 6
0
        public virtual void TestToArray()
        {
            var container = new ConformerContainer(confs);
            var array     = (IAtomContainer[])container.ToArray();

            Assert.AreEqual(nconfs, array.Length);
        }
Ejemplo n.º 7
0
        public virtual void TestContains()
        {
            var container = new ConformerContainer(confs);
            var o         = container[0];

            Assert.IsTrue(container.Contains(o));
        }
Ejemplo n.º 8
0
        public virtual void TestClear()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            container.Clear();
            Assert.AreEqual(0, container.Count());
        }
Ejemplo n.º 9
0
        public virtual void TestSet_int_Object()
        {
            var container = new ConformerContainer(confs);
            int location  = 5;

            container.Set(location, container[location + 1]);
            Assert.AreEqual(location, container.IndexOf(container[location + 1]));
        }
Ejemplo n.º 10
0
        public virtual void TestIndexOf_IAtomContainer()
        {
            var container = new ConformerContainer(confs);
            var ac        = container[2];
            var index     = container.IndexOf(ac);

            Assert.AreEqual(2, index);
        }
Ejemplo n.º 11
0
        static PharmacophoreUtilityTest()
        {
            var filename = "NCDK.Data.MDL.pcoretest1.sdf";
            var ins      = ResourceLoader.GetAsStream(filename);
            var reader   = new EnumerableMDLConformerReader(ins, ChemObjectBuilder.Instance);

            conformers = reader.FirstOrDefault();
        }
Ejemplo n.º 12
0
        public virtual void TestGet2()
        {
            var container = new ConformerContainer(confs);

            for (var i = 0; i < container.Count + 1; i++)
            {
                var dummy = container[i];
            }
        }
Ejemplo n.º 13
0
        public virtual void TestLastIndexOf_Object()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            int x = container.LastIndexOf(container[3]);

            Assert.AreEqual(3, container.LastIndexOf(container[3]));
        }
Ejemplo n.º 14
0
        public virtual void TestAdd_Object()
        {
            var container = new ConformerContainer();

            Assert.IsNotNull(container);
            foreach (var conf in confs)
            {
                container.Add(conf);
            }
            Assert.AreEqual(nconfs, container.Count());
        }
Ejemplo n.º 15
0
        public virtual void TestContainsAll_Collection()
        {
            var container = new ConformerContainer(confs);

            Assert.IsNotNull(container);
            Assert.AreEqual(nconfs, container.Count());
            foreach (var e in container)
            {
                Assert.IsTrue(container.Contains(e));
            }
        }
Ejemplo n.º 16
0
        public virtual void TestIterator2()
        {
            var container = new ConformerContainer(confs);
            int nmol      = 0;

            foreach (var conf in container)
            {
                nmol++;
            }
            Assert.AreEqual(nconfs, nmol);
        }
Ejemplo n.º 17
0
        static PharmacophoreMatcherTest()
        {
            var filename = "NCDK.Data.MDL.pcoretest1.sdf";
            var ins      = ResourceLoader.GetAsStream(filename);
            var reader   = new EnumerableMDLConformerReader(ins, CDK.Builder).GetEnumerator();

            if (reader.MoveNext())
            {
                conformers = (ConformerContainer)reader.Current;
            }
        }
Ejemplo n.º 18
0
        public virtual void TestRemove_Object()
        {
            ConformerContainer cContainer = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, cContainer.Count());
            IAtomContainer container = cContainer[3];

            Assert.IsTrue(cContainer.Contains(container));
            cContainer.Remove(container);
            Assert.AreEqual(nconfs - 1, cContainer.Count());
            Assert.IsFalse(cContainer.Contains(container));
        }
Ejemplo n.º 19
0
        public virtual void TestRemoveAll_Collection()
        {
            var container = new ConformerContainer(confs);

            Assert.IsNotNull(container);
            Assert.AreEqual(nconfs, container.Count());

            foreach (var e in container)
            {
                container.Remove(e);
            }
            Assert.AreEqual(0, container.Count());
        }
Ejemplo n.º 20
0
        public virtual void TestIndexOf_Object()
        {
            var container = new ConformerContainer(confs);

            Assert.IsNotNull(container);

            int counter = 0;

            foreach (var conf in confs)
            {
                Assert.AreEqual(counter, container.IndexOf(conf));
                counter++;
            }
        }
Ejemplo n.º 21
0
        public virtual void TestConformerContainer()
        {
            var container = new ConformerContainer();

            Assert.IsNotNull(container);
            base_.Title = "myMolecule";
            container.Add(base_);
            Assert.AreEqual(1, container.Count());

            foreach (var conf in confs)
            {
                container.Add(conf);
            }
            Assert.AreEqual(nconfs + 1, container.Count());
        }
Ejemplo n.º 22
0
        public virtual void TestRemove_int()
        {
            var container = new ConformerContainer(confs);

            container.Clear();
            Assert.AreEqual(0, container.Count());

            for (int i = 0; i < nconfs; i++)
            {
                container.Add(confs[i]);
            }
            Assert.AreEqual(nconfs, container.Count());

            container.RemoveAt(0);
            Assert.AreEqual(nconfs - 1, container.Count());
        }
Ejemplo n.º 23
0
        public virtual void TestAdd_int_IAtomContainer()
        {
            ConformerContainer container = new ConformerContainer(confs);

            container.Insert(5, confs[5]);
        }
Ejemplo n.º 24
0
        public virtual void TestGetTitle()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual("myMolecule", container.Title);
        }
Ejemplo n.º 25
0
        public virtual void TestIsEmpty()
        {
            var container = new ConformerContainer(confs);

            Assert.IsTrue(!container.IsEmpty());
        }
Ejemplo n.º 26
0
 public virtual void TestGet_int()
 {
     var container = new ConformerContainer(confs);
     var dummy     = container[100];
 }
Ejemplo n.º 27
0
        public virtual void TestAdd_int_Object()
        {
            var container = new ConformerContainer(confs);

            container.Insert(5, confs[5]);
        }
Ejemplo n.º 28
0
        public virtual void TestSize()
        {
            ConformerContainer container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
        }