4646 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
4747 var state = MockParser . CreateAndParse ( vbe . Object ) ;
4848
49- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
49+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
5050 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
5151 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
5252
7676 var elseifInspector = InspectionsHelper . GetInspector ( elseifInspection ) ;
7777 var elseifInspectionResults = elseifInspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
7878
79- Assert . AreEqual ( 3 , allInspectionResults . Count ( ) ) ;
79+ Assert . AreEqual ( 2 , allInspectionResults . Count ( ) ) ;
8080 Assert . AreEqual ( 1 , elseifInspectionResults . Count ( ) ) ;
8181 }
8282
9797 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
9898 var state = MockParser . CreateAndParse ( vbe . Object ) ;
9999
100- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
100+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
101101 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
102102 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
103103
@@ -120,7 +120,7 @@ Sub Bar()
120120 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
121121 var state = MockParser . CreateAndParse ( vbe . Object ) ;
122122
123- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
123+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
124124 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
125125 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
126126
@@ -144,7 +144,7 @@ End If
144144 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
145145 var state = MockParser . CreateAndParse ( vbe . Object ) ;
146146
147- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
147+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
148148 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
149149 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
150150
@@ -166,7 +166,7 @@ End If
166166 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
167167 var state = MockParser . CreateAndParse ( vbe . Object ) ;
168168
169- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
169+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
170170 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
171171 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
172172
@@ -188,7 +188,7 @@ End If
188188 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
189189 var state = MockParser . CreateAndParse ( vbe . Object ) ;
190190
191- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
191+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
192192 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
193193 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
194194
@@ -210,7 +210,7 @@ End If
210210 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
211211 var state = MockParser . CreateAndParse ( vbe . Object ) ;
212212
213- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
213+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
214214 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
215215 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
216216
@@ -232,7 +232,7 @@ End If
232232 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
233233 var state = MockParser . CreateAndParse ( vbe . Object ) ;
234234
235- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
235+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
236236 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
237237 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
238238
@@ -255,7 +255,7 @@ End If
255255 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
256256 var state = MockParser . CreateAndParse ( vbe . Object ) ;
257257
258- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
258+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
259259 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
260260 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
261261
@@ -278,7 +278,7 @@ End If
278278 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
279279 var state = MockParser . CreateAndParse ( vbe . Object ) ;
280280
281- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
281+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
282282 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
283283 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
284284
@@ -301,7 +301,7 @@ Sub Bar()
301301 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
302302 var state = MockParser . CreateAndParse ( vbe . Object ) ;
303303
304- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
304+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
305305 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
306306 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
307307
@@ -327,8 +327,7 @@ End If
327327 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
328328 var state = MockParser . CreateAndParse ( vbe . Object ) ;
329329
330- var inspection = new EmptyConditionBlockInspection ( state ,
331- ConditionBlockToInspect . If & ConditionBlockToInspect . ElseIf ) ;
330+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
332331 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
333332 var inspectionResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
334333
@@ -350,7 +349,7 @@ End If
350349 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputcode , out component ) ;
351350 var state = MockParser . CreateAndParse ( vbe . Object ) ;
352351
353- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
352+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
354353 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
355354 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
356355 const int expectedCount = 1 ;
@@ -400,7 +399,7 @@ End If
400399 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
401400 var state = MockParser . CreateAndParse ( vbe . Object ) ;
402401
403- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
402+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
404403 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
405404 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
406405 const int expectedCount = 1 ;
@@ -426,7 +425,7 @@ End If
426425 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
427426 var state = MockParser . CreateAndParse ( vbe . Object ) ;
428427
429- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
428+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
430429 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
431430 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
432431 const int expectedCount = 1 ;
@@ -452,7 +451,7 @@ End If
452451 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
453452 var state = MockParser . CreateAndParse ( vbe . Object ) ;
454453
455- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
454+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
456455 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
457456 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
458457 const int expectedCount = 1 ;
@@ -478,7 +477,7 @@ End If
478477 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
479478 var state = MockParser . CreateAndParse ( vbe . Object ) ;
480479
481- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
480+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
482481 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
483482 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
484483 const int expectedCount = 1 ;
@@ -505,7 +504,7 @@ End If
505504 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputcode , out component ) ;
506505 var state = MockParser . CreateAndParse ( vbe . Object ) ;
507506
508- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
507+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
509508 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
510509 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
511510 const int expectedCount = 1 ;
@@ -531,7 +530,7 @@ End If
531530 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
532531 var state = MockParser . CreateAndParse ( vbe . Object ) ;
533532
534- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
533+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
535534 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
536535 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
537536 const int expectedCount = 1 ;
@@ -556,7 +555,7 @@ End If
556555 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
557556 var state = MockParser . CreateAndParse ( vbe . Object ) ;
558557
559- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
558+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . All ) ;
560559 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
561560 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
562561 const int expectedCount = 1 ;
@@ -601,7 +600,7 @@ public void EmptyElseBlock_QuickFixRemoveInLineIfThenElse()
601600 {
602601 const string inputCode =
603602@"Sub Foo()
604- If True Then Else
603+ If True Then Else
605604End Sub" ;
606605
607606 const string expectedCode =
@@ -613,7 +612,7 @@ If Not True Then
613612 var vbe = MockVbeBuilder . BuildFromSingleStandardModule ( inputCode , out component ) ;
614613 var state = MockParser . CreateAndParse ( vbe . Object ) ;
615614
616- var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . Else ) ;
615+ var inspection = new EmptyConditionBlockInspection ( state , ConditionBlockToInspect . If ) ;
617616 var inspector = InspectionsHelper . GetInspector ( inspection ) ;
618617 var actualResults = inspector . FindIssuesAsync ( state , CancellationToken . None ) . Result ;
619618
0 commit comments