Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Testing the UltraTabbedMdiManager
posted

I have a composit application, not CAB, and I add forms as MdiChildren and they show up and behave as expected with the TabbedMdiManager at runtime. However, I am also writing extensive unit / interaction tests on my UI and I have run into a snag.

 In my test code:

 _applicationShell = new ApplicationShell();

            StubPresenter presenter1 = new StubPresenter("One");
            StubPresenter presenter2 = new StubPresenter("Two");
            StubPresenter presenter3 = new StubPresenter("Three");

            MdiTabs tabs = new MdiTabs(_applicationShell);


            tabs.OpenScreen(presenter1);
            tabs.OpenScreen(presenter2);
            tabs.OpenScreen(presenter3);
           
            Assert.AreEqual(presenter3.View, tabs.SelectedControl);

            tabs.ActivateSubject(presenter2.Subject);

            Assert.AreSame(presenter2.View, tabs.SelectedControl);

 After tabs.OpenScreen(...) is called, the MdiParent (_applicationShell) has 3 MdiChildren, however the UltraTabbedMdiManager has 0 tab groups and no tabs. 

 The form never actually displays during this test, but that shouldn't affect the functionallity of the tabbedmdimanager should it? I am I just missing something obvious here?