Наследование: ITestResultClass
Пример #1
0
        Control createClassResultControl(TestResultClass result)
        {
            Debug.Assert(result.Error_ != null || result.Methods_ != null);

            var control = new UI.TestResultClass
            {
                ClassName = { Content = result.ClassName }
            };

            hideError(control.ErrorLabel);

            if (_config.isClassCollapsed(result.Namespace, result.ClassName))
            {
                control.Expander.IsExpanded = false;
                connectClassExpander(result, control);
                return(control);
            }

            control.Expander.IsExpanded = true;
            connectClassExpander(result, control);

            if (result.Error_ != null)
            {
                showError(control.ErrorLabel, result.Error_);
                return(control);
            }

            foreach (var methodControl in result.Methods_.Select(createMethodResultControl))
            {
                control.Methods.Children.Add(methodControl);
            }

            return(control);
        }
Пример #2
0
        void classExpanded(TestResultClass result, UI.TestResultClass ui)
        {
            ui.ErrorLabel.Visibility = Visibility.Visible;
            ui.Methods.Visibility    = Visibility.Visible;

            ClassExpanded.raise(result.Namespace, result.ClassName);
        }
Пример #3
0
        void classCollapsed(TestResultClass result, UI.TestResultClass ui)
        {
            ui.ErrorLabel.Visibility = Visibility.Collapsed;
            ui.Methods.Visibility    = Visibility.Collapsed;

            ClassCollapsed.raise(result.Namespace, result.ClassName);
        }
Пример #4
0
        void connectClassExpander(TestResultClass result, UI.TestResultClass ui)
        {
            var expander = ui.Expander;

            expander.Expanded  += (s, args) => classExpanded(result, ui);
            expander.Collapsed += (s, args) => classCollapsed(result, ui);
        }
Пример #5
0
        Control createClassResultControl(TestResultClass result)
        {
            Debug.Assert(result.Error_ != null || result.Methods_ != null);

            var control = new UI.TestResultClass
            {
                ClassName = { Content = result.ClassName }
            };

            hideError(control.ErrorLabel);

            if (_config.isClassCollapsed(result.Namespace, result.ClassName))
            {
                control.Expander.IsExpanded = false;
                connectClassExpander(result, control);
                return control;
            }

            control.Expander.IsExpanded = true;
            connectClassExpander(result, control);

            if (result.Error_ != null)
            {
                showError(control.ErrorLabel, result.Error_);
                return control;
            }

            foreach (var methodControl in result.Methods_.Select(createMethodResultControl))
            {
                control.Methods.Children.Add(methodControl);
            }

            return control;
        }
Пример #6
0
        void connectClassExpander(TestResultClass result, UI.TestResultClass ui)
        {
            var expander = ui.Expander;

            expander.Expanded += (s, args) => classExpanded(result, ui);
            expander.Collapsed += (s, args) => classCollapsed(result, ui);
        }
Пример #7
0
        void classExpanded(TestResultClass result, UI.TestResultClass ui)
        {
            ui.ErrorLabel.Visibility = Visibility.Visible;
            ui.Methods.Visibility = Visibility.Visible;

            ClassExpanded.raise(result.Namespace, result.ClassName);
        }
Пример #8
0
        void classCollapsed(TestResultClass result, UI.TestResultClass ui)
        {
            ui.ErrorLabel.Visibility = Visibility.Collapsed;
            ui.Methods.Visibility = Visibility.Collapsed;

            ClassCollapsed.raise(result.Namespace, result.ClassName);
        }
Пример #9
0
 public TestResultAssembly(string name, TestResultClass[] classes, TimeSpan runningTime)
 {
     Name = name;
     Classes_ = classes;
     RunningTime = runningTime;
 }