コード例 #1
0
        public void RemoveAtIfEmpty()
        {
            using var list = new PoolingListCanon <object>();

            Assert.AreEqual(0, list.Count);
            Assert.Throws <IndexOutOfRangeException>(() => { list.RemoveAt(0); });
        }
コード例 #2
0
        public void SingleAdditionAndRemoveAt()
        {
            using var list = new PoolingListCanon <object>();
            list.Add(30);
            list.RemoveAt(0);

            Assert.AreEqual(0, list.Count);
            Assert.Throws <IndexOutOfRangeException>(() => { var _ = list[0]; });
        }