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, succeeded
public void starting(FrameworkMethod method)
TestWatchman
starting
in class TestWatchman
public String getMethodName()