【发布时间】:2013-06-18 10:27:34
【问题描述】:
我想在@Before 中获取当前正在执行的测试方法,以便我可以获取应用于当前执行方法的注释。
public class TestCaseExample {
@Before
public void setUp() {
// get current method here.
}
@Test
@MyAnnotation("id")
public void someTest {
// code
}
}
【问题讨论】:
-
请参阅stackoverflow.com/questions/473401/… 了解更多关于此的讨论