Created
September 28, 2015 16:23
-
-
Save stephan-mueller/0388b0f534b0ad61cb39 to your computer and use it in GitHub Desktop.
JUnit test to demonstrate the method execution order defined by the name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FixMethodOrder(NAME_ASCENDING) | |
public class FixMethodOrderNameAscendingTest { | |
private static final Logger LOG = LoggerFactory.getLogger(FixMethodOrderNameAscendingTest.class); | |
@Rule | |
public TestName name = new TestName(); | |
@Test | |
public void methodB() throws Exception { | |
LOG.info("@Test " + name.getMethodName()); | |
} | |
@Test | |
public void methodA() throws Exception { | |
LOG.info("@Test " + name.getMethodName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment