예제 #1
0
        public void PopOnSingletonListYieldsEmptyList()
        {
            PersistentList   p = new PersistentList("abc");
            IPersistentStack s = p.pop();

            Expect(s.count(), EqualTo(0));
        }
예제 #2
0
        public void PopLosesfirstElement()
        {
            PersistentList p  = (PersistentList)PersistentList.create(new object[] { "abc", 1, "def" });
            PersistentList p2 = (PersistentList)p.pop();

            Expect(p2.count(), EqualTo(2));
            Expect(p2.peek(), EqualTo(1));
        }
예제 #3
0
 public void DoublePopOnSingletonListYieldsException()
 {
     PersistentList   p = new PersistentList("abc");
     IPersistentStack s = p.pop().pop();
 }