Skip to content

Instantly share code, notes, and snippets.

@mehmetcemyucel
Last active April 4, 2021 09:03
Show Gist options
  • Save mehmetcemyucel/2b822beab375677d342b0b9410f0c1ff to your computer and use it in GitHub Desktop.
Save mehmetcemyucel/2b822beab375677d342b0b9410f0c1ff to your computer and use it in GitHub Desktop.
springboot-junit-rule
public class TestNameTest {
@Rule
public final TestName name = new TestName();
@Test
public void testA() {
assertEquals("testA", name.getMethodName());
}
@Test
public void testB() {
assertEquals("testB", name.getMethodName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment