public void DoPopAsEmptyList() { IPersistentStack list = new PersistentList(1); list = list.Pop(); Assert.IsNotNull(list); Assert.AreEqual(0, list.Count); Assert.IsInstanceOfType(list, typeof(EmptyList)); }
public void CreateListWithOneObject() { PersistentList list = new PersistentList(1); Assert.IsNotNull(list); Assert.AreEqual(1, list.Count); Assert.IsInstanceOfType(list.First(), typeof(int)); Assert.AreEqual(1, (int)list.First()); Assert.IsNull(list.Next()); }