Created
July 24, 2016 03:53
-
-
Save kaushikgopal/b6aa7d111d48705435ce93d4a2c22b3e to your computer and use it in GitHub Desktop.
Sample use of the Enclosed.class test runner
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
@RunWith(Enclosed.class) | |
public class WorkflowStateMachineTest { | |
@RunWith(Parameterized.class) | |
public static class ParameterizedTests { | |
@Parameter public ISBatchType mTestBatchType; // first data value (0) is default | |
@Parameter(value = 1) public ISWorkflowState mTestBatchState; | |
@Parameters(name = "transitioning back from {1} <- for {0} batch") | |
public static Collection<Object[]> data() { | |
// return ... | |
} | |
// ... | |
@Test | |
public void shouldNotAllowMovingBack_FromParameterizedStates() { | |
// ... | |
} | |
} | |
public static class IndividualTests { | |
@Test | |
public void shouldDoSomething_LikeAnyRegularTest() { | |
// ... | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment