Skip to content

0.8.x Annotations for JUnit4 @BeforeClass @AfterClass

Hiroshi Ukai edited this page Sep 17, 2017 · 3 revisions

@BeforeClass

This annotation lets JCUnit know the annotated static method should be run before all tests defined by enclosing class are run.

Feature Specification
name @BeforeClass
package org.junit
target A static method. The method must have no parameter and return no value.
attributes none

Attributes

(none)

@AfterClass

This annotation lets JCUnit know the annotated static method should be run after all tests defined by enclosing class are finished.

Feature Specification
name @AfterClass
package org.junit
target A static method. The method must have no parameter and return no value.
attributes none

Attributes

(none)

Clone this wiki locally