Skip to content

Commit 9146e54

Browse files
committed
Update newly introduced tests to NUnit
1 parent 4c88805 commit 9146e54

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

RubberduckTests/Settings/HotkeyFactoryTests.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
using System;
2-
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
using NUnit.Framework;
33
using Moq;
44
using Rubberduck.Common.Hotkeys;
55
using Rubberduck.Settings;
66
using Rubberduck.UI.Command;
77

88
namespace RubberduckTests.Settings
99
{
10-
[TestClass]
10+
[TestFixture]
1111
public class HotkeyFactoryTests
1212
{
13-
[TestMethod]
13+
[Test]
1414
public void CreatingHotkeyReturnsNullWhenNoSettingProvided()
1515
{
1616
var factory = new HotkeyFactory(null);
@@ -20,7 +20,7 @@ public void CreatingHotkeyReturnsNullWhenNoSettingProvided()
2020
Assert.IsNull(hotkey);
2121
}
2222

23-
[TestMethod]
23+
[Test]
2424
public void CreatingHotkeyReturnsNullWhenNoMatchingCommandExists()
2525
{
2626
var mockCommand = new Mock<CommandBase>(null).Object;
@@ -32,7 +32,7 @@ public void CreatingHotkeyReturnsNullWhenNoMatchingCommandExists()
3232
Assert.IsNull(hotkey);
3333
}
3434

35-
[TestMethod]
35+
[Test]
3636
public void CreatingHotkeyReturnsCorrectResult()
3737
{
3838
var mockCommand = new Mock<CommandBase>(null).Object;
@@ -46,9 +46,10 @@ public void CreatingHotkeyReturnsCorrectResult()
4646

4747
var hotkey = factory.Create(setting, IntPtr.Zero);
4848

49-
MultiAssert.Aggregate(
50-
() => Assert.AreEqual(mockCommand, hotkey.Command),
51-
() => Assert.AreEqual(setting.ToString(), hotkey.Key));
49+
Assert.Multiple(() => {
50+
Assert.AreEqual(mockCommand, hotkey.Command);
51+
Assert.AreEqual(setting.ToString(), hotkey.Key);
52+
});
5253
}
5354
}
5455
}

RubberduckTests/TodoExplorer/TodoExplorerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public void PicksUpComments_StrangeCasing()
8383
}
8484
}
8585

86-
[TestMethod]
87-
[TestCategory("Annotations")]
86+
[Test]
87+
[Category("Annotations")]
8888
public void PicksUpComments_SpecialCharacters()
8989
{
9090
const string inputCode =
@@ -118,8 +118,8 @@ public void PicksUpComments_SpecialCharacters()
118118
}
119119
}
120120

121-
[TestMethod]
122-
[TestCategory("Annotations")]
121+
[Test]
122+
[Category("Annotations")]
123123
public void AvoidsFalsePositiveComments()
124124
{
125125
const string inputCode =

0 commit comments

Comments
 (0)