org.junit.After类的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中org.junit.After类的一些代码示例,展示了After类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。After类的具体详情如下:
包路径:org.junit.After
类名称:After

After介绍

暂无

代码示例

代码示例来源:origin: ReactiveX/RxJava

@After
  public void doAfterTest() {
    // FIXME LATER
//        TestObstructionDetection.checkObstruction();
  }

代码示例来源:origin: Impetus/Kundera

@After
public void tearDown()
{
  if (em != null)
  {
    em.close();
  }
  if (emf != null)
  {
    emf.close();
  }
}

代码示例来源:origin: spring-projects/spring-framework

@After
public void verifyClosed() throws Exception {
  verify(mockEmf).close();
}

代码示例来源:origin: Impetus/Kundera

@After
public void tearDown() throws Exception
{
  EntityManager em = emf.createEntityManager();
  em.remove(em.find(StudentMongoBigDecimal.class, getMinValue(BigDecimal.class)));
  emf.close();
}

代码示例来源:origin: kiegroup/jbpm

@After
public void after() throws Exception {
  EntityManagerFactory emf = (EntityManagerFactory) context.get(EnvironmentName.ENTITY_MANAGER_FACTORY);
  UserTransaction ut = InitialContext.doLookup("java:comp/UserTransaction");
  ut.begin();
  try {
    EntityManager em = emf.createEntityManager();
    em.createQuery("delete from CorrelationPropertyInfo").executeUpdate();
    em.createQuery("delete from CorrelationKeyInfo").executeUpdate();
    ut.commit();
  } catch (Exception ex) {
    ut.rollback();
    Assert.fail("Exception thrown while trying to cleanup correlation data.");
  }
  cleanUp(context);
}

代码示例来源:origin: Impetus/Kundera

/**
 * Tear down.
 */
@After
public void tearDown()
{
  em.createQuery("DELETE FROM Person p").executeUpdate();
  em.close();
  emf.close();
}

代码示例来源:origin: kiegroup/jbpm

@After
public void afterThis() { 
  if( emf != null && emf.isOpen() ) { 
    emf.close();
  }
  emf = null;
}

代码示例来源:origin: Impetus/Kundera

/**
 * Tear down.
 * 
 * @throws Exception
 *             the exception
 */
@After
public void tearDown() throws Exception
{
  EntityManager em = emf.createEntityManager();
  em.close();
}

代码示例来源:origin: Impetus/Kundera

@After
public void tearDown()
{
  if (em != null)
  {
    em.close();
  }
  if (emf != null)
  {
    emf.close();
  }
}

代码示例来源:origin: kiegroup/jbpm

@After
public void clean() {
  if (emf != null) {
    emf.close();
  }
  if (pds != null) {
    pds.close();
  }
}

代码示例来源:origin: Impetus/Kundera

@After
public void tearDown() throws Exception
{
  EntityManager em = emf.createEntityManager();
  em.remove(em.find(StudentMongoUUID.class, getMinValue(UUID.class)));
  MongoUtils.dropDatabase(emf, "MongoDataTypeTest");
  emf.close();
}

代码示例来源:origin: kiegroup/jbpm

@After
public void afterThis() { 
  if( emf != null && emf.isOpen() ) { 
    emf.close();
  }
  emf = null;
}

代码示例来源:origin: Impetus/Kundera

/**
 * @throws java.lang.Exception
 */
@After
public void tearDown() throws Exception
{
  em.close();
  emf.close();
  puProperties = null;
}

代码示例来源:origin: spring-projects/spring-framework

@After
public void cleanUp() {
  ContextHierarchyDirtiesContextTests.context = null;
  ContextHierarchyDirtiesContextTests.foo = null;
  ContextHierarchyDirtiesContextTests.bar = null;
  ContextHierarchyDirtiesContextTests.baz = null;
}

代码示例来源:origin: kiegroup/jbpm

@After
public void clean() {
  
  if (emf != null) {
    emf.close();
  }
  if (pds != null) {
    pds.close();
  }
}

代码示例来源:origin: Impetus/Kundera

/**
 * @throws java.lang.Exception
 */
@After
public void tearDown() throws Exception
{
  em.close();
  emf.close();
}

代码示例来源:origin: spring-projects/spring-framework

@After
public void closeContext() {
  if (this.context != null) {
    this.context.close();
  }
}

代码示例来源:origin: kiegroup/jbpm

@After
public void clean() {
  if (emf != null) {
    emf.close();
  }
  if (pds != null) {
    pds.close();
  }
}

代码示例来源:origin: Impetus/Kundera

/**
 * @throws java.lang.Exception
 */
@After
public void tearDown() throws Exception
{
  em.close();
  emf.close();
}

代码示例来源:origin: spring-projects/spring-framework

@After
public void closeContext() {
  if (context != null) {
    context.close();
  }
}

相关文章

微信公众号

最新文章

更多

After类方法