Example #1
0
        public void TrimExcessTest()
        {
            var l = new EventedList <EClass>(10);

            l.AddRange(new[] { new EClass(1), new EClass(2), new EClass(3) });
            Assert.That(l.Capacity, Is.EqualTo(10));
            Assert.That(l.Count, Is.EqualTo(3));
            l.TrimExcess();
            Assert.That(l.Count, Is.EqualTo(l.Capacity));
        }