本文整理匯總了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);
}