public void Exec(vsCommandExecOption ExecuteOption, ref object VariantIn, ref object VariantOut, ref bool Handled) { var pos = new OnDemandRunFromCursorPosition(_applicationObject); var types = pos.FromCurrentPosition(); if (types.Tests.Count() == 1 || types.Members.Count() == 1) { var assembly = _getAssemblyFromProject(_applicationObject.ActiveDocument.ProjectItem.ContainingProject.FullName); if (assembly == null) return; var test = types.Tests.Count() > 0 ? types.Tests.ElementAt(0) : types.Members.ElementAt(0); var testMessage = new CacheTestMessage(assembly, new Messages.TestResult(Messages.TestRunner.Any, Messages.TestRunStatus.Passed, test)); _peek(testMessage); if (!_manualBuild() || _buildRunner.Build()) { var debugger = new DebugHandler(_applicationObject); _debug(testMessage); } } }
public void DebugTest(CacheTestMessage message) { var debugger = new DebugHandler(_application); debugger.Debug(message); LastDebugSession = message; }