1- using System ;
2- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
32using System . Linq ;
43using Rubberduck . Parsing ;
54using Rubberduck . Parsing . Annotations ;
65using Rubberduck . Parsing . Symbols ;
76using Rubberduck . Parsing . VBA ;
87using Rubberduck . VBEditor ;
9- using Rubberduck . VBEditor . ComManagement . TypeLibsAPI ;
108using Rubberduck . VBEditor . Extensions ;
119using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
1210
1311namespace Rubberduck . UnitTesting
1412{
15- // FIXME make internal. Nobody outside of RD.UnitTesting needs this!
16- public static class TestDiscovery // todo: reimplement using state.DeclarationFinder
13+ // FIXME make internal. Nobody outside of RD.UnitTesting needs this!
14+ public static class TestDiscovery // todo: reimplement using state.DeclarationFinder
1715 {
1816 public static IEnumerable < TestMethod > GetAllTests ( RubberduckParserState state )
1917 {
@@ -37,10 +35,9 @@ public static IEnumerable<TestMethod> GetTests(IVBE vbe, IVBComponent component,
3735
3836 public static bool IsTestMethod ( RubberduckParserState state , Declaration item )
3937 {
40- return ! state . AllUserDeclarations . Any (
41- d => d . DeclarationType == DeclarationType . Parameter && Equals ( d . ParentScopeDeclaration , item ) ) &&
42- item . Accessibility == Accessibility . Public &&
43- item . Annotations . Any ( a => a . AnnotationType == AnnotationType . TestMethod ) ;
38+ return ! state . AllUserDeclarations . Any ( d =>
39+ d . DeclarationType == DeclarationType . Parameter && Equals ( d . ParentScopeDeclaration , item ) ) &&
40+ item . Annotations . Any ( a => a . AnnotationType == AnnotationType . TestMethod ) ;
4441 }
4542
4643 public static IEnumerable < Declaration > FindModuleInitializeMethods ( QualifiedModuleName module , RubberduckParserState state )
0 commit comments