public void ClearMap()
        {
            MockRepository mocks = new MockRepository();
            CodeRootMap    map   = new CodeRootMap();
            IBaseConstruct bc;

            using (mocks.Record())
            {
                bc = mocks.DynamicMock <IBaseConstruct>();
                Expect.Call(bc.WalkChildren()).Return(new List <IBaseConstruct>().AsReadOnly());
            }

            map.AddBaseConstructAsNewChild(bc, Version.User);

            Assert.That(map.AllNodes, Has.Count(1));
            Assert.That(map.ChildNodes, Has.Count(1));

            map.Clear();

            Assert.That(map.AllNodes, Has.Count(0));
            Assert.That(map.ChildNodes, Has.Count(0));
        }
        public void ClearMap()
        {
            MockRepository mocks = new MockRepository();
            CodeRootMap map = new CodeRootMap();
            IBaseConstruct bc;
            using(mocks.Record())
            {
                bc = mocks.DynamicMock<IBaseConstruct>();
                Expect.Call(bc.WalkChildren()).Return(new List<IBaseConstruct>().AsReadOnly());
            }

            map.AddBaseConstructAsNewChild(bc, Version.User);

            Assert.That(map.AllNodes, Has.Count(1));
            Assert.That(map.ChildNodes, Has.Count(1));

            map.Clear();

            Assert.That(map.AllNodes, Has.Count(0));
            Assert.That(map.ChildNodes, Has.Count(0));
        }