Пример #1
0
        public void Verify()
        {
            TearDown();

            if (!verified)
            {
                verified = true;
                List <Form> allForms = new FormFinder().FindAll();

                foreach (Form form in allForms)
                {
                    if (!KeepAlive.ShouldKeepAlive(form))
                    {
                        form.Dispose();
                        form.Hide();
                    }
                }

                bool modalVerify = modal.Verify();

                modal.Dispose();

                if (UseHidden)
                {
                    testDesktop.Dispose();
                }

                mouse.Dispose();
                keyboard.Dispose();

                if (!modalVerify)
                {
                    throw new FormsTestAssertionException("unexpected/expected modal was invoked/not invoked");
                }
            }
        }
Пример #2
0
        public void Verify()
        {
            TearDown();

            if (!verified)
            {
                verified = true;
                List<Form> allForms = new FormFinder().FindAll();

                foreach (Form form in allForms)
                {
                    if (!KeepAlive.ShouldKeepAlive(form))
                    {
                        form.Dispose();
                        form.Hide();
                    }
                }

                bool modalVerify = modal.Verify();

                modal.Dispose();

                if (UseHidden)
                {
                    testDesktop.Dispose();
                }

                mouse.Dispose();
                keyboard.Dispose();

                if (!modalVerify)
                {
                    throw new FormsTestAssertionException("unexpected/expected modal was invoked/not invoked");
                }
            }
        }