@@ -67,7 +67,7 @@ public TestExplorerViewModel(ISelectionService selectionService,
67
67
NavigateCommand = new NavigateCommand ( selectionService ) ;
68
68
RunSingleTestCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteSingleTestCommand , CanExecuteSingleTest ) ;
69
69
RunSelectedTestsCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteSelectedTestsCommand , CanExecuteSelectedTestsCommand ) ;
70
- RunSelectedGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteRunSelectedGroupCommand , CanExecuteSelectedGroupCommand ) ;
70
+ RunSelectedGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteRunSelectedGroupCommand , CanExecuteGroupCommand ) ;
71
71
CancelTestRunCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteCancelTestRunCommand , CanExecuteCancelTestRunCommand ) ;
72
72
ResetResultsCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteResetResultsCommand , CanExecuteResetResultsCommand ) ;
73
73
CopyResultsCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteCopyResultsCommand ) ;
@@ -76,8 +76,8 @@ public TestExplorerViewModel(ISelectionService selectionService,
76
76
ExpandAllCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteExpandAll ) ;
77
77
IgnoreTestCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteIgnoreTestCommand ) ;
78
78
UnignoreTestCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteUnignoreTestCommand ) ;
79
- IgnoreSelectedGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteIgnoreGroupCommand , CanIgnoreSelectedGroupCommand ) ;
80
- UnignoreSelectedGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteUnignoreGroupCommand , CanUnignoreSelectedGroupCommand ) ;
79
+ IgnoreGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteIgnoreGroupCommand , CanIgnoreGroupCommand ) ;
80
+ UnignoreGroupCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteUnignoreGroupCommand , CanUnignoreGroupCommand ) ;
81
81
82
82
RewritingManager = rewritingManager ;
83
83
AnnotationUpdater = annotationUpdater ;
@@ -312,8 +312,8 @@ public bool DisplayIgnoreGroupLabel
312
312
public CommandBase IgnoreTestCommand { get ; }
313
313
public CommandBase UnignoreTestCommand { get ; }
314
314
315
- public CommandBase IgnoreSelectedGroupCommand { get ; }
316
- public CommandBase UnignoreSelectedGroupCommand { get ; }
315
+ public CommandBase IgnoreGroupCommand { get ; }
316
+ public CommandBase UnignoreGroupCommand { get ; }
317
317
318
318
#endregion
319
319
@@ -329,19 +329,19 @@ private bool CanExecuteSelectedTestsCommand(object obj)
329
329
return ! Model . IsBusy && obj is IList viewModels && viewModels . Count > 0 ;
330
330
}
331
331
332
- private bool CanExecuteSelectedGroupCommand ( object obj )
332
+ private bool CanExecuteGroupCommand ( object obj )
333
333
{
334
334
return ! Model . IsBusy && ( MouseOverTest != null || MouseOverGroup != null ) ;
335
335
}
336
336
337
- private bool CanIgnoreSelectedGroupCommand ( object obj )
337
+ private bool CanIgnoreGroupCommand ( object obj )
338
338
{
339
- return CanExecuteSelectedGroupCommand ( obj ) ;
339
+ return CanExecuteGroupCommand ( obj ) ;
340
340
}
341
341
342
- private bool CanUnignoreSelectedGroupCommand ( object obj )
342
+ private bool CanUnignoreGroupCommand ( object obj )
343
343
{
344
- return CanExecuteSelectedGroupCommand ( obj ) ;
344
+ return CanExecuteGroupCommand ( obj ) ;
345
345
}
346
346
347
347
private bool CanExecuteResetResultsCommand ( object obj )
@@ -460,16 +460,21 @@ private void ExecuteIgnoreGroupCommand (object parameter)
460
460
461
461
foreach ( TestMethodViewModel test in testGroup . Items )
462
462
{
463
- var needsIgnoreAnnotationAdded = true ;
464
- foreach ( var annotation in test . Method . Declaration . Annotations )
465
- {
466
- if ( annotation . Annotation is IgnoreTestAnnotation )
467
- {
468
- needsIgnoreAnnotationAdded = false ;
469
- } ;
470
- }
471
-
472
- if ( needsIgnoreAnnotationAdded )
463
+ //var needsIgnoreAnnotationAdded = true;
464
+ //foreach (var annotation in test.Method.Declaration.Annotations)
465
+ //{
466
+ // if (annotation.Annotation is IgnoreTestAnnotation)
467
+ // {
468
+ // needsIgnoreAnnotationAdded = false;
469
+ // };
470
+ //}
471
+
472
+ //if (needsIgnoreAnnotationAdded)
473
+ //{
474
+ // AnnotationUpdater.AddAnnotation(rewriteSession, test.Method.Declaration, ignoreTestAnnotation);
475
+ //}
476
+
477
+ if ( ! test . Method . IsIgnored )
473
478
{
474
479
AnnotationUpdater . AddAnnotation ( rewriteSession , test . Method . Declaration , ignoreTestAnnotation ) ;
475
480
}
0 commit comments