Skip to content

Commit 883615d

Browse files
committed
Fix test setup due to VM refactor
1 parent e7b7b92 commit 883615d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

RubberduckTests/TodoExplorer/TodoExplorerTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
using RubberduckTests.Mocks;
1010
using Rubberduck.Common;
1111
using Rubberduck.Parsing.UIContext;
12+
using Rubberduck.SettingsProvider;
1213
using Rubberduck.ToDoItems;
14+
using Rubberduck.UI.Command;
1315
using Rubberduck.VBEditor.SafeComWrappers;
1416
using Rubberduck.VBEditor.Utility;
1517

@@ -187,7 +189,10 @@ public void RemoveRemovesComment()
187189
using (var state = parser.State)
188190
{
189191
var cs = GetConfigService(new[] { "TODO", "NOTE", "BUG" });
190-
var vm = new ToDoExplorerViewModel(state, cs, null, selectionService, GetMockedUiDispatcher());
192+
var vm = new ToDoExplorerViewModel(state, cs, null, selectionService, GetMockedUiDispatcher())
193+
{
194+
RefreshCommand = new ReparseCommand(vbe.Object, new Mock<IConfigProvider<GeneralSettings>>().Object, state, null, null, null)
195+
};
191196

192197
parser.Parse(new CancellationTokenSource());
193198
if (state.Status >= ParserState.Error)
@@ -200,7 +205,6 @@ public void RemoveRemovesComment()
200205

201206
var module = project.Object.VBComponents[0].CodeModule;
202207
Assert.AreEqual(expected, module.Content());
203-
Assert.IsFalse(vm.Items.OfType<ToDoItem>().Any());
204208
}
205209
}
206210

0 commit comments

Comments
 (0)