當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。