Пример #1
0
        public void Contains()
        {
            var d = new DObject();

            d.Contains("key").ShouldBeFalse();

            d["key"] = "value";

            d.Contains("key").ShouldBeTrue();
        }
Пример #2
0
        public void Remove()
        {
            var d = new DObject {
                ["key1"] = "value"
            };

            d.Rename("key1", "key2");

            d.Contains("key1").ShouldBeFalse();
            d.Contains("key2").ShouldBeTrue();

            Should.Throw <KeyNotFoundException>(() => d.Rename("key1", "key2"));
        }
Пример #3
0
        public void Rename()
        {
            var d = new DObject {
                ["key"] = "value"
            };

            d.Remove("key");

            d.Contains("key").ShouldBeFalse();
        }
Пример #4
0
        public void Clear()
        {
            var d = new DObject {
                ["key"] = "value"
            };

            d.Clear();

            d.Contains("key").ShouldBeFalse();
        }