Ejemplo n.º 1
0
        public void PeekYieldsFirstElementAndListUnchanged()
        {
            PersistentList p = (PersistentList)PersistentList.create(new object[] { "abc", 1, "def" });

            Expect(p.peek(), EqualTo("abc"));
            Expect(p.count(), EqualTo(3));
        }
Ejemplo n.º 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));
        }