当前位置: 首页>>代码示例>>Java>>正文


Java AfterEach类代码示例

本文整理汇总了Java中org.junit.jupiter.api.AfterEach的典型用法代码示例。如果您正苦于以下问题:Java AfterEach类的具体用法?Java AfterEach怎么用?Java AfterEach使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AfterEach类属于org.junit.jupiter.api包,在下文中一共展示了AfterEach类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() {
    if (isSet(client)) {
        client.stop();
        client = null;
    }
    if (isSet(game)) {
        game.stopAndWait();
        game = null;
    }

    System.clearProperty(OcraftConfig.CLIENT_BUFFER_SIZE_RESPONSE_STREAM);
    System.clearProperty(OcraftConfig.CLIENT_BUFFER_SIZE_RESPONSE_EVENT_BUS);
    System.clearProperty(OcraftConfig.CLIENT_BUFFER_SIZE_RESPONSE_BACKPRESSURE);
    System.clearProperty(OcraftConfig.CLIENT_BUFFER_SIZE_REQUEST_EVENT_BUS);
    System.clearProperty(OcraftConfig.CLIENT_BUFFER_SIZE_REQUEST_QUEUE);
    refreshConfig();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:19,代码来源:OcraftS2ClientStressIT.java

示例2: afterEach

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void afterEach(OutputCapture outputCapture) {
	System.out.println("@AfterEach");

	outputCapture.expect(containsString("@BeforeEach"));
	outputCapture.expect(containsString("@AfterEach"));
}
 
开发者ID:sbrannen,项目名称:junit5-demo,代码行数:8,代码来源:SystemOutputTests.java

示例3: afterEach

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void afterEach() throws IOException {
    GfaParserFactory.setInstance(null);
    MetadataParserFactory.setInstance(null);
    if (currentFileName != null) {
        Files.deleteIfExists(Paths.get(currentFileName + FileDatabaseDriver.DB_FILE_EXTENSION));
        Files.deleteIfExists(Paths.get(currentFileName + ".hygenecache"));
    }
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:10,代码来源:GfaFileTest.java

示例4: basicAfterEach

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
/**
 * Hide the application after each test.
 * Afterwards, calls the {@link #afterEach()} method.
 *
 * @throws TimeoutException if unable to hide application
 */
@AfterEach
public final void basicAfterEach() throws TimeoutException, UIInitialisationException {
    FxToolkit.cleanupApplication(Hygene.getInstance());
    FxToolkit.cleanupStages();

    afterEach();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:14,代码来源:UITestBase.java

示例5: stop

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
public void stop() {
  if (vertx != null) {
    logger.info("Stopping embedded HTTP server");
    vertx.close();
    logger.info("Stopped embedded HTTP server");
  }
}
 
开发者ID:glytching,项目名称:dragoman,代码行数:9,代码来源:AbstractResourceTest.java

示例6: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
public void tearDown() {
  StopWatch stopWatch = StopWatch.start();
  getMongoClient()
      .getDatabase(storageCoordinates.getDatabaseName())
      .drop()
      .subscribe(
          success -> logger.info("Dropped database: {}", storageCoordinates.getDatabaseName()));
  logger.info("Dropped test data in {}ms", stopWatch.stop());
}
 
开发者ID:glytching,项目名称:dragoman,代码行数:11,代码来源:MongoRepositoryTest.java

示例7: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws Exception {
  for (final Path path : Files.list(directory).collect(toList())) {
    Files.delete(path);
  }
  Files.delete(directory);
}
 
开发者ID:HPI-Information-Systems,项目名称:AdvancedDataProfilingSeminar,代码行数:8,代码来源:TPMMSTest.java

示例8: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
public void tearDown() throws Exception {
  DataSource dataSource = (DataSource) ctx.getBean("dataSource");
  if (dataSource instanceof EmbeddedDatabase) {
    ((EmbeddedDatabase) dataSource).shutdown();
  }
}
 
开发者ID:makotogo,项目名称:odotCore,代码行数:8,代码来源:ItemDaoTest.java

示例9: rollbackTransaksjon

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
@After
public void rollbackTransaksjon() {
    if (platformTransactionManager != null && transactionStatus != null) {
        platformTransactionManager.rollback(transactionStatus);
    }
}
 
开发者ID:navikt,项目名称:fo-veilarbjobbsokerkompetanse,代码行数:8,代码来源:AbstractIntegrasjonsTest.java

示例10: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() {
    command = null;
}
 
开发者ID:ViniciusArnhold,项目名称:ProjectAltaria,代码行数:5,代码来源:AbstractCommandTest.java

示例11: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
    fileDatabase.close();
    super.tearDown();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:6,代码来源:FileBookmarksTest.java

示例12: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
    fileDatabase.close();

    super.tearDown();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:7,代码来源:GraphLoaderTest.java

示例13: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
    deleteDatabaseFile();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:5,代码来源:FileDatabaseTestBase.java

示例14: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
    fileDatabaseDriver.close();
    super.tearDown();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:6,代码来源:FileDatabaseDriverTest.java

示例15: tearDown

import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException {
    Arrays.stream(new File(GFA_FILE_NAME).getParentFile().listFiles())
            .filter(file -> file.getName().endsWith(".png"))
            .forEach(File::delete);
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:7,代码来源:SnapshotTest.java


注:本文中的org.junit.jupiter.api.AfterEach类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。