| Package | Description |
|---|---|
| org.junit.rules |
| Modifier and Type | Class and Description |
|---|---|
class |
TestName
The TestName Rule makes the current test name available inside test methods:
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());
}
}
|
Copyright © 2002–2016 JUnit. All rights reserved.