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