Example #1
0
        public void ConsWorks()
        {
            MapEntry me = new MapEntry(1, "abc");
            IPersistentVector v1 = me.cons(2);

            Expect(me.count(), EqualTo(2));
            Expect(me.key(), EqualTo(1));
            Expect(me.val(), EqualTo("abc"));

            Expect(v1.count(), EqualTo(3));
            Expect(v1.nth(0), EqualTo(1));
            Expect(v1.nth(1), EqualTo("abc"));
            Expect(v1.nth(2), EqualTo(2));
        }