public override void TestTearDown()
        {
            if (m_mainWnd != null)
            {
                m_mainWnd.CloseViews();

                // Before we close the main window undo anything on the main window's undo stack
                // (separate from the undo stack created when the cache was created).
                UndoAll();

                m_mainWnd.Close();
            }
            m_mainWnd = null;

            base.TestTearDown();
        }
Beispiel #2
0
        public void CleanUp()
        {
            CheckDisposed();

            UndoResult ures = 0;

            while (m_cache.CanUndo)
            {
                m_cache.Undo(out ures);
                if (ures == UndoResult.kuresFailed || ures == UndoResult.kuresError)
                {
                    Assert.Fail("ures should not be == " + ures.ToString());
                }
            }
            // Don't dispose the cache, until after the window closes, as it needs it
            // to clear its notification from the cache.
            // m_mainWnd.Hide();
            m_mainWnd.Close();
            // m_mainWnd.Dispose(); // Not needed, since Close calls Dispose.
            m_mainWnd = null;

            m_cache.Dispose();
            m_cache = null;
        }