本文整理汇总了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();
}
示例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"));
}
示例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"));
}
}
示例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();
}
示例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");
}
}
示例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());
}
示例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);
}
示例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();
}
}
示例9: rollbackTransaksjon
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
@After
public void rollbackTransaksjon() {
if (platformTransactionManager != null && transactionStatus != null) {
platformTransactionManager.rollback(transactionStatus);
}
}
示例10: tearDown
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() {
command = null;
}
示例11: tearDown
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
fileDatabase.close();
super.tearDown();
}
示例12: tearDown
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
fileDatabase.close();
super.tearDown();
}
示例13: tearDown
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
deleteDatabaseFile();
}
示例14: tearDown
import org.junit.jupiter.api.AfterEach; //导入依赖的package包/类
@AfterEach
void tearDown() throws IOException, SQLException {
fileDatabaseDriver.close();
super.tearDown();
}
示例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);
}