1
1
using System . Linq ;
2
2
using System . Threading ;
3
- using Microsoft . VisualStudio . TestTools . UnitTesting ;
3
+ using NUnit . Framework ;
4
4
using Rubberduck . Inspections . Concrete ;
5
5
using Rubberduck . Parsing . Inspections . Resources ;
6
6
using RubberduckTests . Mocks ;
7
7
8
8
namespace RubberduckTests . Inspections
9
9
{
10
- [ TestClass ]
10
+ [ TestFixture ]
11
11
public class UnhandledOnErrorResumeNextInspectionTest
12
12
{
13
- [ TestMethod ]
14
- [ TestCategory ( "Inspections" ) ]
13
+ [ Test ]
14
+ [ Category ( "Inspections" ) ]
15
15
public void UnhandledOnErrorResumeNext_ReturnsResult ( )
16
16
{
17
17
const string inputCode =
@@ -31,8 +31,8 @@ On Error Resume Next
31
31
}
32
32
}
33
33
34
- [ TestMethod ]
35
- [ TestCategory ( "Inspections" ) ]
34
+ [ Test ]
35
+ [ Category ( "Inspections" ) ]
36
36
public void UnhandledOnErrorResumeNext_GoToDeclaredBefore_ReturnsResult ( )
37
37
{
38
38
const string inputCode =
@@ -53,8 +53,8 @@ On Error Resume Next
53
53
}
54
54
}
55
55
56
- [ TestMethod ]
57
- [ TestCategory ( "Inspections" ) ]
56
+ [ Test ]
57
+ [ Category ( "Inspections" ) ]
58
58
public void UnhandledOnErrorResumeNext_GoToDeclaredAfter_DoesNotReturnResult ( )
59
59
{
60
60
const string inputCode =
@@ -75,8 +75,8 @@ On Error GoTo 0
75
75
}
76
76
}
77
77
78
- [ TestMethod ]
79
- [ TestCategory ( "Inspections" ) ]
78
+ [ Test ]
79
+ [ Category ( "Inspections" ) ]
80
80
public void UnhandledOnErrorResumeNext_MultipleStatements_ReturnsMultipleResults ( )
81
81
{
82
82
const string inputCode =
@@ -97,8 +97,8 @@ On Error Resume Next
97
97
}
98
98
}
99
99
100
- [ TestMethod ]
101
- [ TestCategory ( "Inspections" ) ]
100
+ [ Test ]
101
+ [ Category ( "Inspections" ) ]
102
102
public void UnhandledOnErrorResumeNext_GoToDeclaredBeforeMultipleStatements_ReturnsMultipleResults ( )
103
103
{
104
104
const string inputCode =
@@ -120,8 +120,8 @@ On Error Resume Next
120
120
}
121
121
}
122
122
123
- [ TestMethod ]
124
- [ TestCategory ( "Inspections" ) ]
123
+ [ Test ]
124
+ [ Category ( "Inspections" ) ]
125
125
public void UnhandledOnErrorResumeNext_GoToDeclaredBetweenMultipleStatements_ReturnsResult ( )
126
126
{
127
127
const string inputCode =
@@ -143,8 +143,8 @@ On Error Resume Next
143
143
}
144
144
}
145
145
146
- [ TestMethod ]
147
- [ TestCategory ( "Inspections" ) ]
146
+ [ Test ]
147
+ [ Category ( "Inspections" ) ]
148
148
public void UnhandledOnErrorResumeNext_GoToDeclaredAfterMultipleStatements_DoesNotReturnResult ( )
149
149
{
150
150
const string inputCode =
@@ -166,8 +166,8 @@ On Error GoTo 0
166
166
}
167
167
}
168
168
169
- [ TestMethod ]
170
- [ TestCategory ( "Inspections" ) ]
169
+ [ Test ]
170
+ [ Category ( "Inspections" ) ]
171
171
public void UnhandledOnErrorResumeNext_StatementsInDifferentProcedures_ReturnsResultsPerProcedure ( )
172
172
{
173
173
const string inputCode =
@@ -192,8 +192,8 @@ On Error Resume Next
192
192
}
193
193
}
194
194
195
- [ TestMethod ]
196
- [ TestCategory ( "Inspections" ) ]
195
+ [ Test ]
196
+ [ Category ( "Inspections" ) ]
197
197
public void UnhandledOnErrorResumeNext_Ignored_DoesNotReturnResult ( )
198
198
{
199
199
const string inputCode =
@@ -214,16 +214,16 @@ On Error Resume Next
214
214
}
215
215
}
216
216
217
- [ TestMethod ]
218
- [ TestCategory ( "Inspections" ) ]
217
+ [ Test ]
218
+ [ Category ( "Inspections" ) ]
219
219
public void InspectionType ( )
220
220
{
221
221
var inspection = new UnhandledOnErrorResumeNextInspection ( null ) ;
222
222
Assert . AreEqual ( CodeInspectionType . CodeQualityIssues , inspection . InspectionType ) ;
223
223
}
224
224
225
- [ TestMethod ]
226
- [ TestCategory ( "Inspections" ) ]
225
+ [ Test ]
226
+ [ Category ( "Inspections" ) ]
227
227
public void InspectionName ( )
228
228
{
229
229
const string inspectionName = "UnhandledOnErrorResumeNextInspection" ;
0 commit comments