Skip to content

Commit fe17236

Browse files
committed
Switched to NUnit
1 parent 2b82362 commit fe17236

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

RubberduckTests/Inspections/UnhandledOnErrorResumeNextInspectionTest.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
using System.Linq;
22
using System.Threading;
3-
using Microsoft.VisualStudio.TestTools.UnitTesting;
3+
using NUnit.Framework;
44
using Rubberduck.Inspections.Concrete;
55
using Rubberduck.Parsing.Inspections.Resources;
66
using RubberduckTests.Mocks;
77

88
namespace RubberduckTests.Inspections
99
{
10-
[TestClass]
10+
[TestFixture]
1111
public class UnhandledOnErrorResumeNextInspectionTest
1212
{
13-
[TestMethod]
14-
[TestCategory("Inspections")]
13+
[Test]
14+
[Category("Inspections")]
1515
public void UnhandledOnErrorResumeNext_ReturnsResult()
1616
{
1717
const string inputCode =
@@ -31,8 +31,8 @@ On Error Resume Next
3131
}
3232
}
3333

34-
[TestMethod]
35-
[TestCategory("Inspections")]
34+
[Test]
35+
[Category("Inspections")]
3636
public void UnhandledOnErrorResumeNext_GoToDeclaredBefore_ReturnsResult()
3737
{
3838
const string inputCode =
@@ -53,8 +53,8 @@ On Error Resume Next
5353
}
5454
}
5555

56-
[TestMethod]
57-
[TestCategory("Inspections")]
56+
[Test]
57+
[Category("Inspections")]
5858
public void UnhandledOnErrorResumeNext_GoToDeclaredAfter_DoesNotReturnResult()
5959
{
6060
const string inputCode =
@@ -75,8 +75,8 @@ On Error GoTo 0
7575
}
7676
}
7777

78-
[TestMethod]
79-
[TestCategory("Inspections")]
78+
[Test]
79+
[Category("Inspections")]
8080
public void UnhandledOnErrorResumeNext_MultipleStatements_ReturnsMultipleResults()
8181
{
8282
const string inputCode =
@@ -97,8 +97,8 @@ On Error Resume Next
9797
}
9898
}
9999

100-
[TestMethod]
101-
[TestCategory("Inspections")]
100+
[Test]
101+
[Category("Inspections")]
102102
public void UnhandledOnErrorResumeNext_GoToDeclaredBeforeMultipleStatements_ReturnsMultipleResults()
103103
{
104104
const string inputCode =
@@ -120,8 +120,8 @@ On Error Resume Next
120120
}
121121
}
122122

123-
[TestMethod]
124-
[TestCategory("Inspections")]
123+
[Test]
124+
[Category("Inspections")]
125125
public void UnhandledOnErrorResumeNext_GoToDeclaredBetweenMultipleStatements_ReturnsResult()
126126
{
127127
const string inputCode =
@@ -143,8 +143,8 @@ On Error Resume Next
143143
}
144144
}
145145

146-
[TestMethod]
147-
[TestCategory("Inspections")]
146+
[Test]
147+
[Category("Inspections")]
148148
public void UnhandledOnErrorResumeNext_GoToDeclaredAfterMultipleStatements_DoesNotReturnResult()
149149
{
150150
const string inputCode =
@@ -166,8 +166,8 @@ On Error GoTo 0
166166
}
167167
}
168168

169-
[TestMethod]
170-
[TestCategory("Inspections")]
169+
[Test]
170+
[Category("Inspections")]
171171
public void UnhandledOnErrorResumeNext_StatementsInDifferentProcedures_ReturnsResultsPerProcedure()
172172
{
173173
const string inputCode =
@@ -192,8 +192,8 @@ On Error Resume Next
192192
}
193193
}
194194

195-
[TestMethod]
196-
[TestCategory("Inspections")]
195+
[Test]
196+
[Category("Inspections")]
197197
public void UnhandledOnErrorResumeNext_Ignored_DoesNotReturnResult()
198198
{
199199
const string inputCode =
@@ -214,16 +214,16 @@ On Error Resume Next
214214
}
215215
}
216216

217-
[TestMethod]
218-
[TestCategory("Inspections")]
217+
[Test]
218+
[Category("Inspections")]
219219
public void InspectionType()
220220
{
221221
var inspection = new UnhandledOnErrorResumeNextInspection(null);
222222
Assert.AreEqual(CodeInspectionType.CodeQualityIssues, inspection.InspectionType);
223223
}
224224

225-
[TestMethod]
226-
[TestCategory("Inspections")]
225+
[Test]
226+
[Category("Inspections")]
227227
public void InspectionName()
228228
{
229229
const string inspectionName = "UnhandledOnErrorResumeNextInspection";

RubberduckTests/QuickFixes/RestoreErrorHandlingQuickFixTests.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
using System.Linq;
22
using System.Threading;
3-
using Microsoft.VisualStudio.TestTools.UnitTesting;
3+
using NUnit.Framework;
44
using Rubberduck.Inspections.Concrete;
55
using Rubberduck.Inspections.QuickFixes;
66
using RubberduckTests.Inspections;
77
using RubberduckTests.Mocks;
88

99
namespace RubberduckTests.QuickFixes
1010
{
11-
[TestClass]
11+
[TestFixture]
1212
public class RestoreErrorHandlingQuickFixTests
1313
{
14-
[TestMethod]
15-
[TestCategory("QuickFixes")]
14+
[Test]
15+
[Category("QuickFixes")]
1616
public void UnhandledOnErrorResumeNext_QuickFixWorks_Procedure()
1717
{
1818
const string inputCode =
@@ -45,8 +45,8 @@ End If
4545
}
4646
}
4747

48-
[TestMethod]
49-
[TestCategory("QuickFixes")]
48+
[Test]
49+
[Category("QuickFixes")]
5050
public void UnhandledOnErrorResumeNext_QuickFixWorks_Function()
5151
{
5252
const string inputCode =
@@ -79,8 +79,8 @@ End If
7979
}
8080
}
8181

82-
[TestMethod]
83-
[TestCategory("QuickFixes")]
82+
[Test]
83+
[Category("QuickFixes")]
8484
public void UnhandledOnErrorResumeNext_QuickFixWorks_Property()
8585
{
8686
const string inputCode =
@@ -113,8 +113,8 @@ End If
113113
}
114114
}
115115

116-
[TestMethod]
117-
[TestCategory("QuickFixes")]
116+
[Test]
117+
[Category("QuickFixes")]
118118
public void UnhandledOnErrorResumeNext_QuickFixWorks_ExistingLabel()
119119
{
120120
const string inputCode =
@@ -151,8 +151,8 @@ End If
151151
}
152152
}
153153

154-
[TestMethod]
155-
[TestCategory("QuickFixes")]
154+
[Test]
155+
[Category("QuickFixes")]
156156
public void UnhandledOnErrorResumeNext_QuickFixWorks_MultipleIssues()
157157
{
158158
const string inputCode =
@@ -197,8 +197,8 @@ End If
197197
}
198198
}
199199

200-
[TestMethod]
201-
[TestCategory("QuickFixes")]
200+
[Test]
201+
[Category("QuickFixes")]
202202
public void UnhandledOnErrorResumeNext_QuickFixWorks_MultipleIssuesAndExistingLabel()
203203
{
204204
const string inputCode =

0 commit comments

Comments
 (0)