當前位置: 首頁>>代碼示例>>Java>>正文


Java AfterMethod類代碼示例

本文整理匯總了Java中org.testng.annotations.AfterMethod的典型用法代碼示例。如果您正苦於以下問題:Java AfterMethod類的具體用法?Java AfterMethod怎麽用?Java AfterMethod使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AfterMethod類屬於org.testng.annotations包,在下文中一共展示了AfterMethod類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: disposeDriver

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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();
    }
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:17,代碼來源:JavaDriverTest.java

示例2: tearDown

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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);
    }
}
 
開發者ID:paypal,項目名稱:butterfly,代碼行數:9,代碼來源:CompressionHandlerTest.java

示例3: disposeDriver

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:9,代碼來源:FindByCssSelectorTest.java

示例4: disposeDriver

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    JavaElementFactory.reset();
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:10,代碼來源:JSpinnerJavaElementTest.java

示例5: tearDown

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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);
}
 
開發者ID:luoyaogui,項目名稱:otter-G,代碼行數:12,代碼來源:ArbitrateOppositeIntegration.java

示例6: tearDown

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod
public void tearDown() {
    nodeEvent.destory(node1.getId());
    nodeEvent.destory(node2.getId());
    nodeEvent.destory(node3.getId());
    nodeEvent.destory(node4.getId());
}
 
開發者ID:luoyaogui,項目名稱:otter-G,代碼行數:8,代碼來源:NodeMonitorTest.java

示例7: afterMethod

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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");
}
 
開發者ID:Nordstrom,項目名稱:TestNG-Foundation,代碼行數:8,代碼來源:MethodListenerExtension.java

示例8: disposeDriver

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    EventQueueWait.waitTillInvisibled(frame);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:10,代碼來源:JMenuItemJavaElement2Test.java

示例9: cleanupResources

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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);
}
 
開發者ID:epam,項目名稱:Lagerta,代碼行數:8,代碼來源:BaseIntegrationTest.java

示例10: testCleanup

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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());
    }
}
 
開發者ID:eclipse,項目名稱:keti,代碼行數:10,代碼來源:PolicyEvalWithGraphDbControllerIT.java

示例11: disposeDriver

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod public void disposeDriver() throws Throwable {
    SwingUtilities.invokeAndWait(new Runnable() {
        @Override public void run() {
            frame.setVisible(false);
            frame.dispose();
        }
    });
    if (driver != null) {
        driver.quit();
    }
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:12,代碼來源:JScrollBarTest.java

示例12: printCaseError

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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);
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:9,代碼來源:FDSeparateCompilationTest.java

示例13: stopTestApp

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod
public void stopTestApp() throws Exception {
    testApp.getOutputStream().write(1);
    testApp.getOutputStream().flush();
    testApp.waitFor();
    testApp = null;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:JMXStatusPerfCountersTest.java

示例14: setUpAfterMethod

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@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);
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:MonarchRecordReaderTest.java

示例15: afterMethod

import org.testng.annotations.AfterMethod; //導入依賴的package包/類
@AfterMethod
public void afterMethod(Method method) {
    if ("testMethod".equals(method.getName())) {
        afterResult = Reporter.getCurrentTestResult();
        fromAfter = (String) afterResult.getAttribute(ATTRIBUTE);
    }
}
 
開發者ID:Nordstrom,項目名稱:TestNG-Foundation,代碼行數:8,代碼來源:SkipFromMethod.java


注:本文中的org.testng.annotations.AfterMethod類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。