Search in sources :

Example 61 with After

use of org.junit.After in project Activiti by Activiti.

the class SerializableVariablesDiabledTest method removeUsers.

@After
public void removeUsers() {
    identityService.deleteMembership(testUserId, testGroupId);
    identityService.deleteGroup(testGroupId);
    identityService.deleteUser(testUserId);
    for (Deployment deployment : repositoryService.createDeploymentQuery().list()) {
        repositoryService.deleteDeployment(deployment.getId(), true);
    }
}
Also used : Deployment(org.activiti.engine.repository.Deployment) After(org.junit.After)

Example 62 with After

use of org.junit.After in project Activiti by Activiti.

the class SecureScriptingBaseTest method shutdownProcessEngine.

@After
public void shutdownProcessEngine() {
    for (Deployment deployment : repositoryService.createDeploymentQuery().list()) {
        repositoryService.deleteDeployment(deployment.getId(), true);
    }
    this.taskService = null;
    this.repositoryService = null;
    this.runtimeService = null;
    this.processEngine.close();
    this.processEngine = null;
}
Also used : Deployment(org.activiti.engine.repository.Deployment) After(org.junit.After)

Example 63 with After

use of org.junit.After in project nhin-d by DirectProject.

the class AuditorFactoryTest method cleanUpSPIFiles.

@Before
@After
public void cleanUpSPIFiles() {
    File spiFile = new File(resourceDirLoc + SPIFileName);
    if (spiFile.exists())
        spiFile.delete();
    spiFile = new File(cloverResourceDirLoc + SPIFileName);
    if (spiFile.exists())
        spiFile.delete();
}
Also used : File(java.io.File) Before(org.junit.Before) After(org.junit.After)

Example 64 with After

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

the class PollContextIT method tearDown.

@After
public void tearDown() throws Exception {
    for (final OnmsNode node : m_nodeDao.findAll()) {
        m_nodeDao.delete(node);
    }
    m_nodeDao.flush();
    MockLogAppender.assertNoWarningsOrGreater();
}
Also used : OnmsNode(org.opennms.netmgt.model.OnmsNode) After(org.junit.After)

Example 65 with After

use of org.junit.After in project heron by twitter.

the class MetricsCacheSinkTest method after.

@After
@SuppressWarnings("unchecked")
public void after() throws Exception {
    // Remove the Singleton by Reflection
    Field field = SingletonRegistry.INSTANCE.getClass().getDeclaredField("singletonObjects");
    field.setAccessible(true);
    Map<String, Object> singletonObjects = (Map<String, Object>) field.get(SingletonRegistry.INSTANCE);
    singletonObjects.clear();
}
Also used : Field(java.lang.reflect.Field) Map(java.util.Map) HashMap(java.util.HashMap) 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