Closed
Description
People keep asking for BeforeAll
and AfterAll
hooks. I haven't had a big need for them myself, but it seems to me this would be sufficient:
public class GlobalHooks {
private static boolean dunit = false;
@Before
public void beforeAll() {
if(!dunit) {
Runtime.getRuntime().addShutdownHook(afterAllThread);
// do the beforeAll stuff...
dunit = true;
}
}
}
If this doesn't cut it for you, please explain in this ticket, and maybe we'll add special support for it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Implemented