Created
September 28, 2015 16:23
-
-
Save stephan-mueller/348170e0b57a43814e9c to your computer and use it in GitHub Desktop.
JUnit test to demonstrate the method execution order defined by the JVM.
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(JVM) | |
public class FixMethodOrderJVMTest { | |
private static final Logger LOG = LoggerFactory.getLogger(FixMethodOrderJVMTest.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