public void Enable()
        {
            var pool = new PoolCollectionDynamic <Target>(new TargetBuilder());

            Target target = pool.Enable();

            Assert.NotNull(target);
            Assert.AreEqual(5, pool.Count);
            Assert.AreEqual(1, pool.EnabledCount);
            Assert.AreEqual(4, pool.DisabledCount);
        }
        public void IsExpandRequired()
        {
            var pool = new PoolCollectionDynamic <Target>(new TargetBuilder());

            for (int i = 0; i < 5; i++)
            {
                pool.Enable();
            }

            bool result0 = pool.IsExpandRequired();

            Assert.True(result0);
        }
        public void DisableAll()
        {
            var pool = new PoolCollectionDynamic <Target>(new TargetBuilder());

            for (int i = 0; i < 6; i++)
            {
                pool.Enable();
            }

            Assert.AreEqual(10, pool.Count);
            Assert.AreEqual(6, pool.EnabledCount);
            Assert.AreEqual(4, pool.DisabledCount);

            pool.DisableAll();

            Assert.AreEqual(5, pool.Count);
            Assert.AreEqual(0, pool.EnabledCount);
            Assert.AreEqual(5, pool.DisabledCount);
        }
        public void Disable()
        {
            var pool  = new PoolCollectionDynamic <Target>(new TargetBuilder());
            var items = new List <Target>();

            for (int i = 0; i < 6; i++)
            {
                items.Add(pool.Enable());
            }

            Assert.AreEqual(10, pool.Count);
            Assert.AreEqual(6, pool.EnabledCount);
            Assert.AreEqual(4, pool.DisabledCount);

            for (int i = 0; i < items.Count; i++)
            {
                pool.Disable(items[i]);
            }

            Assert.AreEqual(5, pool.Count);
            Assert.AreEqual(0, pool.EnabledCount);
            Assert.AreEqual(5, pool.DisabledCount);
        }