예제 #1
0
        public static void TestRunnerControlInstantiation()
        {
            TestRunnerControl control = null;
            AsyncTestRunner   runner  = null;
            ObjectProxy       proxy   = null;

            try
            {
                proxy  = new StubObjectProxy();
                runner = new PmlTestRunner(proxy, new StubMethodInvoker());
                proxy  = null;
                var provider = new FileIndexTestCaseProvider();
                control = new TestRunnerControl(provider, runner, new RegistrySettingsProvider());
                runner  = null;
            }
            finally
            {
                if (proxy != null)
                {
                    proxy.Dispose();
                }
                if (runner != null)
                {
                    runner.Dispose();
                }
                if (control != null)
                {
                    control.Dispose();
                }
            }
        }
예제 #2
0
        public TestForm()
        {
            ObjectProxy       proxy   = null;
            AsyncTestRunner   runner  = null;
            TestRunnerControl control = null;

            try
            {
                Index         = new MutablePathIndex(Path.GetFullPath("..\\..\\..\\..\\pmllib-tests"));
                proxy         = new StubObjectProxy();
                runner        = new PmlTestRunner(proxy, new ControlMethodInvoker(this), new StubClock(), Index);
                proxy         = null;
                control       = new TestRunnerControl(Index, runner, new RegistrySettingsProvider());
                RunnerControl = control;
                runner        = null;
                control.Dock  = DockStyle.Fill;

                InitializeComponent();

                PathComboBox.Text          = Index.Path;
                FolderBrowser.SelectedPath = Index.Path;

                ControlPanel.Controls.Add(control);

                control = null;
            }
            finally
            {
                if (control != null)
                {
                    control.Dispose();
                }
                if (runner != null)
                {
                    runner.Dispose();
                }
                if (proxy != null)
                {
                    proxy.Dispose();
                }
            }
        }