本文整理匯總了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);
}
}
示例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\"");
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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");
}
示例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");
}
示例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();
}
示例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
}
}
示例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
}
}
示例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);
}
}
示例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);
}
}
示例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());
}