public void Expandability() { LegacyList expandableList = new LegacyList(); Assert.AreEqual(10, expandableList.Capacity()); for (int i = 0; i < 11; i++) { expandableList.Add(i); } Assert.AreEqual(11, expandableList.Size()); Assert.AreEqual(20, expandableList.Capacity()); }
public void AllowDuplicates() { manyElement.Add("sasha"); Assert.AreEqual(3, manyElement.Size()); }
public void ReadOnlyOnAdd() { oneElement.SetReadOnly(true); oneElement.Add("eva"); Assert.AreEqual(1, oneElement.Size()); }