当前位置: 首页>>代码示例>>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;未经允许,请勿转载。