示例#1
0
        public void DoPopAsEmptyList()
        {
            IPersistentStack list = new PersistentList(1);
            list = list.Pop();

            Assert.IsNotNull(list);
            Assert.AreEqual(0, list.Count);
            Assert.IsInstanceOfType(list, typeof(EmptyList));
        }
示例#2
0
        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());
        }