public void IndexerAndEnumerator()
        {
            // this seed will produce a number of sources that have zero or one items
            var rand     = new Random(1319791128);
            var expected = new List <Guid> ();
            var actual   = new AggregateObservableCollection <Guid> ();

            for (int i = 0; i < 1000; i++)
            {
                var source = new List <Guid> ();
                actual.AddSource(source);

                for (int j = 0, n = rand.Next(0, 100); j < n; j++)
                {
                    var guid = Guid.NewGuid();
                    expected.Add(guid);
                    source.Add(guid);
                }
            }

            actual.Count.ShouldEqual(expected.Count);

            int index = 0;

            foreach (var item in actual)
            {
                item.ShouldEqual(expected [index]);
                actual [index].ShouldEqual(expected [index]);
                index++;
            }
        }
        public WorkbookPackage(FilePath pendingOpenPath = default(FilePath))
        {
            logicalPath = pendingOpenPath;

            var children = new AggregateObservableCollection <TreeNode> ();

            children.AddSource(new [] { nugetPackagesNode });
            children.AddSource(filesystem);

            TreeNode = new WorkbookTitledNode(this)
            {
                IsExpanded  = true,
                IsRenamable = false,
                IconName    = "solution",
                Children    = children
            };
        }