Search in sources :

Example 51 with After

use of org.junit.After in project android by owncloud.

the class MoveFolderTestSuite method tearDown.

@After
public void tearDown() throws Exception {
    common.takeScreenShotOnFailed(name.getMethodName());
    FileListView fileListView = new FileListView(driver);
    driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
    Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
    Actions.deleteElement(FOLDER_TO_MOVE, fileListView, driver);
    driver.removeApp("com.owncloud.android");
    driver.quit();
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) After(org.junit.After)

Example 52 with After

use of org.junit.After in project L42 by ElvisResearchGroup.

the class TestDatabaseResource method tearDown.

@After
public void tearDown() {
    // Close connection
    sql.close();
    // Shut down the server
    sql.shutdownConnection();
    // Delete the files so we no longer have the database
    String folderName = "./" + TEST_SERVER_NAME + TEST_DATABASE_NAME + "/";
    // Delete the folder from our directory
    File file = new File(folderName);
    if (file.exists()) {
        try {
            delete(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    // Delete the log file
    File logFile = new File("derby.log");
    if (logFile.exists()) {
        try {
            delete(logFile);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) After(org.junit.After)

Example 53 with After

use of org.junit.After in project opennms by OpenNMS.

the class VacuumdIT method tearDown.

@After
public void tearDown() throws Exception {
    m_alarmd.destroy();
    final List<OnmsNode> nodes = m_nodeDao.findAll();
    for (final OnmsNode node : nodes) {
        m_nodeDao.delete(node);
    }
    m_nodeDao.flush();
    MockUtil.println("Sleeping for " + TEAR_DOWN_WAIT_MILLIS + " millis in tearDown...");
    Thread.sleep(TEAR_DOWN_WAIT_MILLIS);
}
Also used : OnmsNode(org.opennms.netmgt.model.OnmsNode) After(org.junit.After)

Example 54 with After

use of org.junit.After in project tdi-studio-se by Talend.

the class AddContextCommentValueMigrationTaskTest method testAfter.

@After
public void testAfter() throws PersistenceException, BusinessException {
    RepositoryObject objToDelete = new RepositoryObject(testItem.getProperty());
    ProxyRepositoryFactory.getInstance().deleteObjectPhysical(objToDelete);
    testItem = null;
}
Also used : RepositoryObject(org.talend.core.model.repository.RepositoryObject) After(org.junit.After)

Example 55 with After

use of org.junit.After in project textdb by TextDB.

the class NlpEntityTest method deleteData.

// table is cleared after each test case
@After
public void deleteData() throws TextDBException {
    RelationManager relationManager = RelationManager.getRelationManager();
    DataWriter oneSentenceDataWriter = relationManager.getTableDataWriter(ONE_SENTENCE_TABLE);
    oneSentenceDataWriter.open();
    oneSentenceDataWriter.clearData();
    oneSentenceDataWriter.close();
    DataWriter twoSentenceDataWriter = relationManager.getTableDataWriter(TWO_SENTENCE_TABLE);
    twoSentenceDataWriter.open();
    twoSentenceDataWriter.clearData();
    twoSentenceDataWriter.close();
}
Also used : RelationManager(edu.uci.ics.textdb.storage.RelationManager) DataWriter(edu.uci.ics.textdb.storage.DataWriter) After(org.junit.After)

Aggregations

After (org.junit.After)1427 File (java.io.File)284 Before (org.junit.Before)137 Test (org.junit.Test)127 List (java.util.List)87 IOException (java.io.IOException)83 Assert (org.junit.Assert)70 Collectors (java.util.stream.Collectors)67 ArrayList (java.util.ArrayList)64 Map (java.util.Map)62 Assert.assertEquals (org.junit.Assert.assertEquals)60 Arrays (java.util.Arrays)56 Collections (java.util.Collections)56 Assert.assertTrue (org.junit.Assert.assertTrue)54 HashMap (java.util.HashMap)53 Rule (org.junit.Rule)50 HashSet (java.util.HashSet)44 Set (java.util.Set)42 UUID (java.util.UUID)42 TimeUnit (java.util.concurrent.TimeUnit)41