Ejemplo n.º 1
0
        void addTest(AssemblyTestConfiguration config)
        {
            var control = new AssemblyTestControl();
            var test = new AssemblyTest(config, control);
            test.ConfigChanged += storeConfig;

            _tests.Add(test);
            var insertPos = _testPanel.Children.Count - 1;
            _testPanel.Children.Insert(insertPos, test.Control);

            control.RemoveButton.Click += (sender, e) => removeTestUser(test);
        }
Ejemplo n.º 2
0
        void addTest(AssemblyTestConfiguration config)
        {
            var control = new AssemblyTestControl();
            var test    = new AssemblyTest(config, control);

            test.ConfigChanged += storeConfig;

            _tests.Add(test);
            var insertPos = _testPanel.Children.Count - 1;

            _testPanel.Children.Insert(insertPos, test.Control);

            control.RemoveButton.Click += (sender, e) => removeTestUser(test);
        }
Ejemplo n.º 3
0
        void addTestUser()
        {
            var dialog = new OpenFileDialog
            {
                Filter = ".NET Assemblies|*.exe;*.dll|All Files|*.*",
            };

            bool?res = dialog.ShowDialog();

            if (res == null || !res.Value)
            {
                return;
            }

            var config = AssemblyTestConfiguration.create(dialog.FileName, Enumerable.Empty <CollapsedClass>());

            addTest(config);

            storeConfig();
        }
Ejemplo n.º 4
0
        public AssemblyTest(AssemblyTestConfiguration config, AssemblyTestControl control)
        {
            _config = config;
            Control = control;

            var path = _config.AssemblyPath;

            control.Title.Content = Path.GetFileName(path);

            _presenter = new TestResultPresenter(config, control);
            _presenter.ClassCollapsed += classCollapsed;
            _presenter.ClassExpanded  += classExpanded;

            _scheduler = new TestScheduler(asyncRunTest);

            _watcher = new LenientFileWatcher(
                Path.GetDirectoryName(path),
                "*.dll");
            _watcher.Changed += _scheduler.schedule;

            _scheduler.schedule();
        }
Ejemplo n.º 5
0
        public AssemblyTest(AssemblyTestConfiguration config, AssemblyTestControl control)
        {
            _config = config;
            Control = control;

            var path = _config.AssemblyPath;

            control.Title.Content = Path.GetFileName(path);

            _presenter = new TestResultPresenter(config, control);
            _presenter.ClassCollapsed += classCollapsed;
            _presenter.ClassExpanded += classExpanded;

            _scheduler = new TestScheduler(asyncRunTest);

            _watcher = new LenientFileWatcher(
                Path.GetDirectoryName(path),
                "*.dll");
            _watcher.Changed += _scheduler.schedule;

            _scheduler.schedule();
        }
Ejemplo n.º 6
0
 public TestResultPresenter(AssemblyTestConfiguration config, UI.AssemblyTestControl control)
 {
     _config = config;
     _control = control;
 }
Ejemplo n.º 7
0
 public TestResultPresenter(AssemblyTestConfiguration config, UI.AssemblyTestControl control)
 {
     _config  = config;
     _control = control;
 }