protected void OnShowTest() { UnitTest test = GetSelectedTest (); if (test == null) return; SourceCodeLocation loc = null; UnitTestResult res = test.GetLastResult (); if (res != null && res.IsFailure) loc = res.GetFailureLocation (); if (loc == null) loc = test.SourceCodeLocation; if (loc != null) IdeApp.Workbench.OpenDocument (loc.FileName, loc.Line, loc.Column); }
protected void OnShowFailure() { UnitTest test = CurrentNode.DataItem as UnitTest; SourceCodeLocation loc = null; UnitTestResult res = test.GetLastResult(); if (res != null && res.IsFailure) { loc = res.GetFailureLocation(); } if (loc == null) { loc = test.SourceCodeLocation; } if (loc != null) { IdeApp.Workbench.OpenDocument(loc.FileName, loc.Line, loc.Column); } }