예제 #1
0
        public virtual void TestClear()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            container.Clear();
            Assert.AreEqual(0, container.Count());
        }
예제 #2
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));
        }
예제 #3
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());
        }
예제 #4
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());
        }
예제 #5
0
        public virtual void TestConformerContainer_arrayIAtomContainer()
        {
            var container = new ConformerContainer(confs);

            Assert.IsNotNull(container);
            Assert.AreEqual(nconfs, container.Count());
        }
예제 #6
0
        public virtual void TestConformerContainer_IAtomContainer()
        {
            var container = new ConformerContainer(base_);

            Assert.IsNotNull(container);
            Assert.AreEqual(1, container.Count());
        }
예제 #7
0
        public virtual void TestAddAll_Collection()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            Assert.IsTrue(container.Contains(container[3]));
        }
예제 #8
0
        public virtual void TestContains_Object()
        {
            var container = new ConformerContainer(confs);

            Assert.AreEqual(nconfs, container.Count());
            Assert.IsTrue(container.Contains(container[3]));
        }
예제 #9
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());
        }
예제 #10
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]));
        }
예제 #11
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));
            }
        }
예제 #12
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());
        }
예제 #13
0
        public virtual void TestSize()
        {
            ConformerContainer container = new ConformerContainer(confs);

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