private ActionResult InDirectory(Func <string, ActionResult> action) { var path = ViewModel.Path; if (_directorySearch.DirectoryExists(path)) { return(action(path)); } else { return(ActionResult.Error($"Path not exists: {path}")); } }
public void DirectoryExistsIfCreated() { Directory.CreateDirectory("bar"); Assert.IsTrue(_search.DirectoryExists("bar")); }