public void SetSelected_Container()
        {
            var target = new ProjectContainer();

            var document = DocumentContainer.Create();

            target.Documents = target.Documents.Add(document);

            var page = PageContainer.CreatePage();

            document.Pages = document.Pages.Add(page);

            var layer = LayerContainer.Create("Layer1", page);

            page.Layers = page.Layers.Add(layer);

            bool raised = false;

            layer.InvalidateLayer += (sender, e) =>
            {
                raised = true;
            };

            target.SetSelected(page);

            Assert.Equal(document, target.CurrentDocument);
            Assert.Equal(page, target.CurrentContainer);
            Assert.True(raised);
        }
        public void SetSelected_Layer()
        {
            var target = new ProjectContainer();

            var page  = new PageContainer();
            var layer = LayerContainer.Create("Layer1", page);

            target.SetSelected(layer);

            Assert.Equal(layer, page.CurrentLayer);
        }
        public void SetSelected_Document()
        {
            var target = new ProjectContainer();

            var document = DocumentContainer.Create();

            target.Documents = target.Documents.Add(document);

            target.SetSelected(document);

            Assert.Equal(document, target.CurrentDocument);
        }