The @Before and @After annotations are equivalent to JUnit. Annotated methods are run before and after each test method.
The @BeforeMethod and @AfterMethod annotations
Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.