コード例 #1
0
 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);
 }
コード例 #2
0
        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);
            }
        }