Exemplo n.º 1
0
        public virtual void FixtureInit()
        {
            TestManager.ApproveFixture("WW", "UI");
            //TestManager.ApproveFixture ("WW", "5Min");

            Init();

            //FwXApp app = MakeApplication();
            string configPath = System.IO.Path.Combine(SIL.FieldWorks.Common.Utils.DirectoryFinder.FWCodeDirectory, m_application.DefaultConfigurationPathname);

            FwApp.App = m_application;

            //review: this seems weird to me (JH); one would think that the application would deliver the window
            //instead, here, we are passing the application to the new window.
            m_window = new FwXWindow(LoadCache("TestLangProj"), null, null, configPath, true);            // (FwXApp)app.MockInstance);

            /* note that someday, when we write a test to test the persistence function,
             * set "TestRestoringFromTestSettings" the second time the application has run in order to pick up
             * the settings from the first run. The code for this is already in xWindow.
             */

            m_window.Show();
            Application.DoEvents();            //without this, tests may fail non-deterministically
        }