示例#1
0
 public void TearDown()
 {
     if (TestContext.CurrentTestOutcome != UnitTestOutcome.Passed)
     {
         if (!Directory.Exists(PathUtil.GetTestFailurePath()))
         {
             Directory.CreateDirectory(PathUtil.GetTestFailurePath());
         }
         PpOperations.SavePresentationAs(
             PathUtil.GetTestFailurePresentationPath(
                 TestContext.TestName + "_" +
                 GetTestingSlideName()));
     }
     PpOperations.ClosePresentation();
 }
 public void TearDown()
 {
     if (TestContext.CurrentTestOutcome != UnitTestOutcome.Passed)
     {
         if (!Directory.Exists(PathUtil.GetTestFailurePath()))
         {
             Directory.CreateDirectory(PathUtil.GetTestFailurePath());
         }
         PpOperations.SavePresentationAs(
             PathUtil.GetTestFailurePresentationPath(
                 TestContext.TestName + "_" +
                 GetTestingSlideName()));
     }
     while (PpOperations.GetNumWindows() > 0)
     {
         PpOperations.ClosePresentation();
     }
     WindowWatcher.RevalidateApp(); // to prevent next test from failing
     TeardownWindowWatching();
 }