Exemplo n.º 1
0
        public void AppendSelectedContainer_ActiveContainerChanged()
        {
            MdiContainerMock container = new MdiContainerMock()
            {
                Title = "Title4", IsSelected = true
            };

            var guid = manager.AppendContainer(container).Guid;

            Assert.AreEqual(guid, manager.ActiveContainer.Guid);
            Assert.AreEqual("Title4", manager.ActiveContainer.Title);
        }
Exemplo n.º 2
0
        public void AppendNotSelectedContainer_ActiveContainerNotChanged()
        {
            MdiContainerMock container = new MdiContainerMock()
            {
                Title = "Title4", IsSelected = false
            };

            manager.AppendContainer(container);

            Assert.AreEqual(guids[0], manager.ActiveContainer.Guid);
            Assert.AreEqual("Title1", manager.ActiveContainer.Title);
        }
Exemplo n.º 3
0
 public WindowsSamples(IWindowsManagerService manager)
 {
     Guids = new List <KeyValuePair <Guid, List <Guid> > >();
     for (int i = 1; i <= 3; i++)
     {
         MdiContainerMock container = new MdiContainerMock()
         {
             Title = "Title" + i
         };
         List <Guid> winds = new List <Guid>();
         for (int j = i; j <= 3; j++)
         {
             var win = new MdiWindowMock()
             {
                 Title = $"Window{i}{j}", InternalText = "Internal text"
             };
             winds.Add(win.Guid);
             container.AddMdiWindow(win);
         }
         Guids.Add(new KeyValuePair <Guid, List <Guid> >(container.Guid, winds));
         manager.AppendContainer(container);
     }
     manager.ActivateContainer(Guids[0].Key);
 }