public void MainViewModel_Handle_DeleteFolderMessage_RefreshFilters()
{
//------------Setup for test--------------------------
CreateFullExportsAndVm();
bool _actionCalled = false;
PopupController.Setup(controller => controller.Show(It.IsAny<string>(), It.IsAny<string>(), MessageBoxButton.YesNo, MessageBoxImage.Warning, null)).Returns(MessageBoxResult.Yes);
//------------Execute Test---------------------------
var repo = MainViewModel.ExplorerViewModel.NavigationViewModel;
PrivateObject p = new PrivateObject(repo, new PrivateType(typeof(NavigationViewModelBase)));
p.SetField("_studioResourceRepository", MockStudioResourceRepository.Object);
p.SetField("_searchFilter", "bob");
MainViewModel.Handle(new DeleteFolderMessage("MyFolder", () =>
{
_actionCalled = true;
}));
//------------Assert Results-------------------------
Assert.IsTrue(_actionCalled);
MockStudioResourceRepository.Verify(a => a.Filter(It.IsAny<Func<IExplorerItemModel, bool>>()), Times.Once());
}