5
5
using Rubberduck . Inspections ;
6
6
using Rubberduck . Inspections . QuickFixes ;
7
7
using Rubberduck . Inspections . Resources ;
8
+ using Rubberduck . Parsing . Symbols ;
8
9
using Rubberduck . Parsing . VBA ;
9
10
using Rubberduck . VBEditor . Application ;
10
11
using Rubberduck . VBEditor . Events ;
@@ -166,11 +167,10 @@ Private Sub IClass1_DoSomething(ByVal a As Integer)
166
167
167
168
[ TestMethod ]
168
169
[ TestCategory ( "Inspections" ) ]
169
- public void ProcedureNotUsed_DoesNotReturnResult_EventImplementation ( )
170
+ public void ProcedureNotUsed_HandlerIsIgnoredForUnraisedEvent ( )
170
171
{
171
172
//Input
172
- const string inputCode1 =
173
- @"Public Event Foo(ByVal arg1 As Integer, ByVal arg2 As String)" ;
173
+ const string inputCode1 = @"Public Event Foo(ByVal arg1 As Integer, ByVal arg2 As String)" ;
174
174
const string inputCode2 =
175
175
@"Private WithEvents abc As Class1
176
176
@@ -195,7 +195,7 @@ Private Sub abc_Foo(ByVal arg1 As Integer, ByVal arg2 As String)
195
195
var inspection = new ProcedureNotUsedInspection ( parser . State ) ;
196
196
var inspectionResults = inspection . GetInspectionResults ( ) ;
197
197
198
- Assert . AreEqual ( 0 , inspectionResults . Count ( ) ) ;
198
+ Assert . AreEqual ( 0 , inspectionResults . Count ( result => result . Target . DeclarationType == DeclarationType . Procedure ) ) ;
199
199
}
200
200
201
201
[ TestMethod ]
0 commit comments