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


Java AfterAll類代碼示例

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


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

示例1: stop

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stop() {
  StopWatch stopWatch = StopWatch.startForSplits();
  try {
    logger.info("Stopping embedded mongod");
    mongod.stop();
    long stopMongodElapsedTime = stopWatch.split();
    mongodExe.stop();
    long stopMongoExeElapsedTime = stopWatch.split();
    logger.info(
        "Stopped embedded Mongo in {}ms (stopMongodElapsedTime={}ms, stopMongoExeElapsedTime={}ms)",
        stopWatch.stop(),
        stopMongodElapsedTime,
        stopMongoExeElapsedTime);
  } catch (Exception ex) {
    logger.warn("Failed to stop embedded mongod!", ex);
  }
}
 
開發者ID:glytching,項目名稱:dragoman,代碼行數:19,代碼來源:AbstractMongoDBTest.java

示例2: assertGeneratedDataSets

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void assertGeneratedDataSets() {
    File xmlDataSetWithAllTables = new File("target/exported/xml/allTables.xml");
    assertThat(xmlDataSetWithAllTables).exists();
    assertThat(contentOf(xmlDataSetWithAllTables)).contains("<USER ID=\"1\" NAME=\"@realpestano\"/>");
    assertThat(contentOf(xmlDataSetWithAllTables)).contains("<USER ID=\"2\" NAME=\"@dbunit\"/>");

    //xmlDataSetWithAllTables.delete();

    File ymlDataSetWithAllTables = new File("target/exported/yml/allTables.yml");
    assertThat(ymlDataSetWithAllTables).exists();
    assertThat(contentOf(ymlDataSetWithAllTables)).
            contains("USER:" + NEW_LINE +
                    "  - ID: 1" + NEW_LINE +
                    "    NAME: \"@realpestano\"" + NEW_LINE +
                    "  - ID: 2" + NEW_LINE +
                    "    NAME: \"@dbunit\"");


}
 
開發者ID:database-rider,項目名稱:database-rider,代碼行數:21,代碼來源:ExportDataSetJUnit5It.java

示例3: run

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
static void afterAll() {
    if (EXCLUDE_FROM_TRAVIS.VALUE) return;
    // delete all test files

    if (!testFolder.deleteDirectory()) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                testFolder.deleteDirectory();
            }
        });
        thread.start();
    }

}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:22,代碼來源:HashAtlasWriterTest.java

示例4: cleanup

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
static void cleanup() throws IllegalArgumentException, IllegalAccessException, IOException {
	if (fileSystemField != null) {
		fileSystemField.set(null, defaultFileSystem);
	}
	if (fileSystem != null) {
		fileSystem.close();
	}
}
 
開發者ID:CMSgov,項目名稱:qpp-conversion-tool,代碼行數:10,代碼來源:ParameterizedBenchmarkTest.java

示例5: stopMariaDB

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stopMariaDB() {
    try {
        database.stop();
    } catch (final ManagedProcessException e) {
        Logger.getLogger(ParticleEffectMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed to stop maria db.", e);
    }
}
 
開發者ID:Shynixn,項目名稱:PetBlocks,代碼行數:9,代碼來源:ParticleEffectMetaMySQLControllerIT.java

示例6: stopMariaDB

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stopMariaDB() {
    try {
        database.stop();
    } catch (final ManagedProcessException e) {
        Logger.getLogger(PlayerMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed to stop mariadb.", e);
    }
}
 
開發者ID:Shynixn,項目名稱:PetBlocks,代碼行數:9,代碼來源:PlayerMetaMySQLControllerIT.java

示例7: stopMariaDB

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stopMariaDB()
{
    try {
        database.stop();
    } catch (final ManagedProcessException e) {
        Logger.getLogger(PetMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed stop maria db.", e);
    }
}
 
開發者ID:Shynixn,項目名稱:PetBlocks,代碼行數:10,代碼來源:PetMetaMySQLControllerIT.java

示例8: teardown

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
static void teardown() {
    clearProperty("sel.jup.chrome.latest.version");
    clearProperty("sel.jup.firefox.latest.version");
    clearProperty("sel.jup.opera.latest.version");
    clearProperty("sel.jup.browser.list.from.docker.hub");
}
 
開發者ID:bonigarcia,項目名稱:selenium-jupiter,代碼行數:8,代碼來源:SelenoidConfigTest.java

示例9: teardown

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
void teardown() {
    assertTrue(recordingFile.exists());
    log.info("Deleting recording {} ... {}", recordingFile,
            recordingFile.delete());
    clearProperty("sel.jup.recording");
}
 
開發者ID:bonigarcia,項目名稱:selenium-jupiter,代碼行數:8,代碼來源:DockerRecordingJupiterTest.java

示例10: teardown

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
void teardown() {
    setProperty("sel.jup.screenshot.at.the.end.of.tests", "false");
    setProperty("sel.jup.screenshot.format", "png");
    setProperty("sel.jup.output.folder", ".");
    assertTrue(imageName.exists());
    imageName.delete();
}
 
開發者ID:bonigarcia,項目名稱:selenium-jupiter,代碼行數:9,代碼來源:ScreenshotSurefireTest.java

示例11: tearDown

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void tearDown() {
    try {
        deleteDirectory(new File("build/resources/test/root/root2"));
        deleteDirectory(new File("build/resources/test/root/root3"));
        deleteDirectory(new File("build/resources/test/root/3c/5c/4e/b9093f3ec0b7ddcdd17238f65c82069f"));
        deleteDirectory(new File("build/resources/test/root/e6/50/6a/ab34e43eaed0238d4c256ec7e6c7879a"));
    } catch (final IOException ex) {
        // ignore
    }
}
 
開發者ID:trellis-ldp-archive,項目名稱:trellis-rosid-file,代碼行數:12,代碼來源:FileResourceServiceTest.java

示例12: tearDown

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void tearDown() {
    try {
        deleteDirectory(resDir1);
        deleteDirectory(resDir10);
    } catch (final IOException ex) {
        // ignore errors
    }
}
 
開發者ID:trellis-ldp-archive,項目名稱:trellis-rosid-file,代碼行數:10,代碼來源:RDFPatchTest.java

示例13: stopMariaDB

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stopMariaDB() {
    try {
        database.stop();
    } catch (final ManagedProcessException e) {
        Logger.getLogger(StatsMySQLControllerTest.class.getSimpleName()).log(Level.WARNING, "Failed stop maria db.", e);
    }
}
 
開發者ID:Shynixn,項目名稱:BlockBall,代碼行數:9,代碼來源:StatsMySQLControllerTest.java

示例14: stopMariaDB

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void stopMariaDB()
{
    try {
        database.stop();
    } catch (final ManagedProcessException e) {
        Logger.getLogger(PlayerMetaMySQLControllerTest.class.getSimpleName()).log(Level.WARNING, "Failed to stop mariadb.", e);
    }
}
 
開發者ID:Shynixn,項目名稱:BlockBall,代碼行數:10,代碼來源:PlayerMetaMySQLControllerTest.java

示例15: allTemporaryFilesAreDeleted

import org.junit.jupiter.api.AfterAll; //導入依賴的package包/類
@AfterAll
public static void allTemporaryFilesAreDeleted() {
  List<String> existingFiles =
      temporaryFilePaths
          .stream()
          .filter(temporaryFilePath -> Files.exists(Paths.get(temporaryFilePath)))
          .collect(Collectors.toList());

  assertThat(existingFiles, empty());
}
 
開發者ID:glytching,項目名稱:junit-extensions,代碼行數:11,代碼來源:TemporaryFolderExtensionParameterTest.java


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