Java 类org.testng.annotations.AfterMethod 实例源码

项目:marathonv5    文件:JavaDriverTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
            if (window != null) {
                window.setVisible(false);
                window.dispose();
                window = null;
            }
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:butterfly    文件:CompressionHandlerTest.java   
@AfterMethod
public void tearDown(){
    File compressedFile = new File(transformation.getTransformedApplicationLocation().getAbsolutePath() + ".zip");
    if(compressedFile.exists()) {
        boolean deleted = compressedFile.delete();
        logger.info("CompressionHandlerTest:tearDown: Removed Compressed File :" + deleted);
    }
}
项目:marathonv5    文件:FindByCssSelectorTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
项目:marathonv5    文件:JavaAgentTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
项目:marathonv5    文件:JSpinnerJavaElementTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    JavaElementFactory.reset();
}
项目:marathonv5    文件:JTableJavaElementTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
项目:otter-G    文件:ArbitrateOppositeIntegration.java   
@AfterMethod
public void tearDown() {
    // 删除mainStem节点
    String path = StagePathUtils.getPipeline(pipelineId) + "/" + ArbitrateConstants.NODE_MAINSTEM;

    zookeeper.delete(path);
    nodeEvent.destory(one.getId());
    // 关闭pipeline
    pipelineEvent.destory(channelId, pipelineId);
    // channelEvent.destory(channelId);
}
项目:otter-G    文件:NodeMonitorTest.java   
@AfterMethod
public void tearDown() {
    nodeEvent.destory(node1.getId());
    nodeEvent.destory(node2.getId());
    nodeEvent.destory(node3.getId());
    nodeEvent.destory(node4.getId());
}
项目:TestNG-Foundation    文件:MethodListenerExtension.java   
@AfterMethod
public void afterMethod() {
    String fromBefore = (String) Reporter.getCurrentTestResult().getAttribute(FROM_BEFORE);
    String fromMethod = (String) Reporter.getCurrentTestResult().getAttribute(FROM_METHOD);
    assertEquals(fromBefore, FROM_BEFORE, "Incorrect [fromBefore] value");
    assertEquals(fromMethod, FROM_METHOD, "Incorrect [fromMethod] value");
}
项目:marathonv5    文件:JListJavaElementTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
项目:marathonv5    文件:JTableHeaderJavaElementTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
项目:marathonv5    文件:JMenuItemJavaElement2Test.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    EventQueueWait.waitTillInvisibled(frame);
}
项目:Lagerta    文件:BaseIntegrationTest.java   
@AfterMethod
public void cleanupResources() throws SQLException {
    TEST_NUMBER++;
    //todo issue #232 fix increment topic partition name for tests on multi jvm
    ALL_RESOURCES.cleanUpClusters();
    DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE);
}
项目:keti    文件:PolicyEvalWithGraphDbControllerIT.java   
@AfterMethod
public void testCleanup() {
    for (BaseSubject subject : this.privilegeManagementService.getSubjects()) {
        this.privilegeManagementService.deleteSubject(subject.getSubjectIdentifier());
    }
    for (BaseResource resource : this.privilegeManagementService.getResources()) {
        this.privilegeManagementService.deleteResource(resource.getResourceIdentifier());
    }
}
项目:marathonv5    文件:JScrollBarTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:openjdk-jdk10    文件:FDSeparateCompilationTest.java   
@AfterMethod
public void printCaseError(ITestResult result) {
    if (result.getStatus() == ITestResult.FAILURE) {
        Hierarchy hs = (Hierarchy)result.getParameters()[0];
        System.out.println("Separate compilation case " + hs);
        printCaseDetails(hs);
    }
}
项目:marathonv5    文件:JRadioButtonTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JProgressBarTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JCheckBoxTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:openjdk-jdk10    文件:JMXStatusPerfCountersTest.java   
@AfterMethod
public void stopTestApp() throws Exception {
    testApp.getOutputStream().write(1);
    testApp.getOutputStream().flush();
    testApp.waitFor();
    testApp = null;
}
项目:monarch    文件:MonarchRecordReaderTest.java   
@AfterMethod
public void setUpAfterMethod() throws RMIException, Exception {
  final Map<String, String> map = new HashMap<>();
  map.put(MonarchUtils.LOCATOR_PORT, testBase.getLocatorPort());
  map.put(MonarchUtils.REGION, regionName);
  MonarchUtils.destroyTable(regionName, map, false, true);
}
项目:marathonv5    文件:JPasswordFieldTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JTabbedPaneTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JListTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JListXTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JSpinner4Test.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:TestNG-Foundation    文件:SkipFromMethod.java   
@AfterMethod
public void afterMethod(Method method) {
    if ("testMethod".equals(method.getName())) {
        afterResult = Reporter.getCurrentTestResult();
        fromAfter = (String) afterResult.getAttribute(ATTRIBUTE);
    }
}
项目:Equella    文件:OAuthApiLockTest.java   
@AfterMethod(alwaysRun = true)
public void cleanupOAuth() throws IOException
{
    if( oauthUri != null )
    {
        deleteResource(oauthUri, token);
    }
}
项目:marathonv5    文件:JInternalFrameTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:DragAndDropTest.java   
@AfterMethod public void disposeDialog() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.dispose();
        }
    });
    EventQueueWait.empty();
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JEditorPaneTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:otter-G    文件:MainStemMonitorTest.java   
@AfterMethod
public void tearDown() {
    nodeEvent.destory(nid);
    pipelineEvent.destory(channelId, pipelineId);
    channelEvent.destory(channelId);

}
项目:marathonv5    文件:JFormattedTextFieldTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JTextFieldTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JTableDialogEditTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JTableTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:otter-G    文件:BaseLoadBalanceTest.java   
@AfterMethod
public void tearDown() {
    nodeEvent.destory(node1.getId());
    nodeEvent.destory(node2.getId());
    nodeEvent.destory(node3.getId());
    nodeEvent.destory(node4.getId());
}
项目:marathonv5    文件:JTableColumnSelectionTest.java   
@AfterMethod public void disposeDriver() throws InterruptedException, InvocationTargetException {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JMenuHorizontalTest.java   
@AfterMethod public void disposeDriver() throws InterruptedException, InvocationTargetException {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
项目:marathonv5    文件:JPopupMenuTest.java   
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
    EventQueueWait.waitTillInvisibled(frame);
}