Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make class name optional in @TestCaseName #157

Open
haluzpav opened this issue Aug 22, 2018 · 0 comments
Open

Make class name optional in @TestCaseName #157

haluzpav opened this issue Aug 22, 2018 · 0 comments

Comments

@haluzpav
Copy link

haluzpav commented Aug 22, 2018

We can currently annotate the test methods with @TestCaseName("[{index}] {1}, {2} -> {4}") but IntelliJ shows the test case name as MyTestClass.[0] 7, hello -> 3.14. The class name should be optional in the same way as the method name with {method}.

Example code:

@RunWith(JUnitParamsRunner.class)
public class MyTestClass {

    @Test
    @Parameters(method = "data")
    @TestCaseName("[{index}] {1}, {2} -> {4}")
    public void paramsInNamedMethod(int i, int j, String p1, int k, double p2) {
        Assert.assertTrue(p2 < 4);
    }

    private static Object[] data() {
        return new Object[]{0, 7, "hello", 0, 3.14};
    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant