示例#1
0
        public void ValAtWithDefaultOnExistingKeyReturnsValue()
        {
            MapEntry me = new MapEntry(1, "abc");

            Expect(me.valAt(0,7), EqualTo(1));
            Expect(me.valAt(1,7), EqualTo("abc"));
        }
示例#2
0
        public void ValAtWithDefaultOnMissingKeyReturnsDefault()
        {
            MapEntry me = new MapEntry(1, "abc");

            Expect(me.valAt(-4,7), EqualTo(7));
            Expect(me.valAt(4, 7), EqualTo(7));
        }
示例#3
0
        public void ValAtOnMissingKeyReturnsNull()
        {
            MapEntry me = new MapEntry(1, "abc");

            Expect(me.valAt(-4), Null);
            Expect(me.valAt(4), Null);
        }