public class TestName extends TestWatchman
public class TestNameTest {
@Rule
public TestName name= new TestName();
@Test
public void testA() {
assertEquals("testA", name.getMethodName());
}
@Test
public void testB() {
assertEquals("testB", name.getMethodName());
}
}
| Constructor and Description |
|---|
TestName() |
| Modifier and Type | Method and Description |
|---|---|
String |
getMethodName() |
void |
starting(FrameworkMethod method)
Invoked when a test method is about to start
|
apply, failed, finished, succeededpublic void starting(FrameworkMethod method)
TestWatchmanstarting in class TestWatchmanpublic String getMethodName()