Beispiel #1
0
        public void RemoveAtIfEmpty()
        {
            using var list = new PoolingListRef <object>();

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

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