Ray Milkey | 3830135 | 2014-07-28 08:51:54 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.util; |
| 2 | |
| 3 | import com.codahale.metrics.MetricFilter; |
| 4 | import net.onrc.onos.core.metrics.OnosMetrics; |
| 5 | import org.junit.After; |
| 6 | import org.junit.Before; |
| 7 | |
| 8 | /** |
| 9 | * Base class that Unit Tests should inherit from. |
| 10 | */ |
| 11 | public class UnitTest { |
| 12 | |
| 13 | /** |
| 14 | * Performs initialization operations requred by all unit tests. |
| 15 | */ |
| 16 | @Before |
| 17 | public void setUpBase() {} |
| 18 | |
| 19 | /** |
| 20 | * Performs clean up operations required by all unit tests. |
| 21 | */ |
| 22 | @After |
| 23 | public void tearDownBase() { |
| 24 | // Destroy any metrics created during the execution of the test. |
| 25 | OnosMetrics.removeMatching(MetricFilter.ALL); |
| 26 | } |
| 27 | |
| 28 | } |