public TestGroupViewModel(string name, IEnumerable<TestCase> testCases, TestListViewModel testListViewModel)
        {
            _testListViewModel = testListViewModel;
            var testCaseList = testCases.ToList();

            Name = name;
            Tests = new ObservableCollection<TestViewModel>(testCaseList.Select(x => new TestViewModel(x)));
            VisibleTests = new ObservableCollection<TestViewModel>(Tests);
            ToggleExpandCollapseCommand = new DelegateCommand(ToggleExpandCollapse);
            ExecuteTestsCommand = new AsyncDelegateCommand(ExecuteTests);
            ExecuteTestsInParallelCommand = new AsyncDelegateCommand(ExecuteTestsInParallel);

            foreach (var testViewModel in Tests)
            {
                testViewModel.PropertyChanged += OnTestViewModelPropertyChanged;
            }

            TotalTestCaseCount = testCaseList.Count;

            EventAggregator.TestResultFilterSelectionChanged += UpdateVisibleTests;
            EventAggregator.TestCategorySelectionChanged += UpdateVisibleTests;
            EventAggregator.SearchStringChanged += x => UpdateVisibleTests();
        }
 public TestCategoryViewModel(string name)
 {
     Name = name;
     ToggleSelectionCommand = new DelegateCommand(ToggleSelection);
 }