@@ -88,20 +88,24 @@ public void ParameterCanBeByVal_NoResultForByValObject()
88
88
const string inputCode =
89
89
@"Sub Foo(ByVal arg1 As Collection)
90
90
End Sub" ;
91
- Assert . AreEqual ( 0 , InspectionResultsForStandardModule ( inputCode ) . Count ( ) ) ;
91
+ var inspectionResults = InspectionResultsForStandardModule ( inputCode ) ;
92
+
93
+ Assert . AreEqual ( 0 , inspectionResults . Count ( ) ) ;
92
94
}
93
95
94
96
[ TestCase ( "Sub Foo(ByVal arg1 As Collection)\r \n End Sub" , 0 ) ]
95
- [ TestCase ( "Sub Foo(arg1 As String\r \n End Sub" , 1 ) ]
97
+ [ TestCase ( "Sub Foo(arg1 As String) \r \n End Sub" , 1 ) ]
96
98
[ TestCase ( "Sub Foo(ByRef arg1 As String)\r \n End Sub" , 1 ) ]
97
99
[ TestCase ( "Sub Foo(arg1 As String, arg2 As Date)\r \n End Sub" , 2 ) ]
98
- [ TestCase ( "Sub Sub Foo(ByVal arg1 As String)\r \n End Sub" , 0 ) ]
100
+ [ TestCase ( "Sub Foo(ByVal arg1 As String)\r \n End Sub" , 0 ) ]
99
101
[ TestCase ( "Sub Foo(arg1 As String, ByVal arg2 As Integer)\r \n End Sub" , 1 ) ]
100
- [ TestCase ( "Foo(ByRef arg1() As Variant)\r \n End Sub" , 0 ) ]
102
+ [ TestCase ( "Sub Foo(ByRef arg1() As Variant)\r \n End Sub" , 0 ) ]
101
103
[ Category ( "Inspections" ) ]
102
104
public void ParameterCanBeByVal_NoResultForByValObject ( string inputCode , int expectedCount )
103
105
{
104
- Assert . AreEqual ( expectedCount , InspectionResultsForStandardModule ( inputCode ) . Count ( ) ) ;
106
+ var inspectionResults = InspectionResultsForStandardModule ( inputCode ) ;
107
+
108
+ Assert . AreEqual ( expectedCount , inspectionResults . Count ( ) ) ;
105
109
}
106
110
107
111
[ Test ]
0 commit comments