com.atlassian.jira.junit.rules
Class ClearStatics

java.lang.Object
  extended by org.junit.rules.TestWatcher
      extended by com.atlassian.jira.junit.rules.ClearStatics
All Implemented Interfaces:
org.junit.rules.TestRule

public class ClearStatics
extends org.junit.rules.TestWatcher

Clear static variables in JIRA to allow tests separattion

Just add this to your test:

     @Rule ClearStatics initMocks = new ClearStatics();

Since:
6.0

Constructor Summary
ClearStatics()
           
 
Method Summary
protected  void finished(org.junit.runner.Description description)
           
protected  void starting(org.junit.runner.Description description)
           
 
Methods inherited from class org.junit.rules.TestWatcher
apply, failed, succeeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearStatics

public ClearStatics()
Method Detail

finished

protected void finished(org.junit.runner.Description description)
Overrides:
finished in class org.junit.rules.TestWatcher

starting

protected void starting(org.junit.runner.Description description)
Overrides:
starting in class org.junit.rules.TestWatcher


Copyright © 2002-2014 Atlassian. All Rights Reserved.