Пример #1
0
        public void EntryAtReturnsNullOnMissingKey()
        {
            Dictionary <int, string> d = new Dictionary <int, string>();

            d[1] = "a";
            d[2] = "b";

            IPersistentMap m = PersistentArrayMap.create(d);

            Expect(m.entryAt(3), Null);
        }
Пример #2
0
        public void EntryAtReturnsEntryforKey()
        {
            Dictionary <int, string> d = new Dictionary <int, string>();

            d[1] = "a";
            d[2] = "b";

            IPersistentMap m  = PersistentArrayMap.create(d);
            IMapEntry      me = m.entryAt(1);

            Expect(me.key(), EqualTo(1));
            Expect(me.val(), EqualTo("a"));
        }