public void child_references_to_parent()
        {
            var scope = new ScopeCollection<int>();

            ScopeBase<int> child = scope.GetChild();

            Assert.AreSame(scope, child.Parent);
        }
        public void child_references_to_parent()
        {
            var scope = new ScopeCollection <int>();

            ScopeBase <int> child = scope.GetChild();

            Assert.AreSame(scope, child.Parent);
        }
        public void contains_all_items_of_parent()
        {
            const string scope_key = "key";
            const int scope_value = 0;

            var scope = new ScopeCollection<int>();
            scope.Add(scope_key, scope_value);

            var child_scope = (ScopeCollection<int>) scope.GetChild();

            Assert.AreEqual(scope_value, child_scope[scope_key]);
        }
        public void contains_all_items_of_parent()
        {
            const string scope_key   = "key";
            const int    scope_value = 0;

            var scope = new ScopeCollection <int>();

            scope.Add(scope_key, scope_value);

            var child_scope = (ScopeCollection <int>)scope.GetChild();

            Assert.AreEqual(scope_value, child_scope[scope_key]);
        }
        public void notifies_on_item_added_to_parent_scope()
        {
            const string scope_key = "key";
            const int scope_value = 0;

            var scope = new ScopeCollection<int>();

            var child_scope = (ScopeCollection<int>) scope.GetChild();

            bool itemAdded = false;
            child_scope.ItemAdded += (_, e) => { if (e.Key == scope_key) itemAdded = true; };

            scope.Add(scope_key, scope_value);

            Assert.IsTrue(itemAdded);
        }
        public void notifies_on_item_added_to_parent_scope()
        {
            const string scope_key   = "key";
            const int    scope_value = 0;

            var scope = new ScopeCollection <int>();

            var child_scope = (ScopeCollection <int>)scope.GetChild();

            bool itemAdded = false;

            child_scope.ItemAdded += (_, e) => { if (e.Key == scope_key)
                                                 {
                                                     itemAdded = true;
                                                 }
            };

            scope.Add(scope_key, scope_value);

            Assert.IsTrue(itemAdded);
        }