コード例 #1
0
        public void should_put_and_get_value()
        {
            AbstractDocument document = new ImplementAbstractDocument(new Dictionary <string, object>());

            document.Put(Key, Value);
            var value = document.Get(Key);

            Assert.Equal(Value, value);
        }
コード例 #2
0
        public void should_retrieve_children()
        {
            AbstractDocument document = new ImplementAbstractDocument(new Dictionary <string, object>());
            var children = new List <IDictionary <string, object> >
            {
                new Dictionary <string, object>(),
                new Dictionary <string, object>()
            };

            document.Put(Key, children);

            IEnumerable <ImplementAbstractDocument> childrenResult = document.Children(
                Key,
                properties => new ImplementAbstractDocument(properties));

            Assert.Equal(2, childrenResult.Count());
        }