diff options
Diffstat (limited to 'src/test/java/junitparams/internal/TestMethodTest.java')
-rw-r--r-- | src/test/java/junitparams/internal/TestMethodTest.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/java/junitparams/internal/TestMethodTest.java b/src/test/java/junitparams/internal/TestMethodTest.java index 2964781..62dc242 100644 --- a/src/test/java/junitparams/internal/TestMethodTest.java +++ b/src/test/java/junitparams/internal/TestMethodTest.java @@ -46,7 +46,7 @@ public class TestMethodTest { public void flatTestMethodStructure() throws Exception { System.setProperty("JUnitParams.flat", "true"); - Description description = plainTestMethod.describe(); + Description description = plainTestMethod.describableFrameworkMethod().getDescription(); assertEquals("for_others_to_work(junitparams.internal.TestMethodTest)", description.getDisplayName()); assertTrue(description.getChildren().isEmpty()); @@ -54,20 +54,26 @@ public class TestMethodTest { } + // Android-changed: CTS and AndroidJUnitRunner rely on specific format to test names, changing + // them will prevent CTS and AndroidJUnitRunner from working properly; see b/36541809 + @Ignore @Test public void hierarchicalTestMethodStructure() throws Exception { System.clearProperty("JUnitParams.flat"); - Description description = plainTestMethod.describe(); + Description description = plainTestMethod.describableFrameworkMethod().getDescription(); assertEquals("forOthersToWork", description.getDisplayName()); assertEquals("[0] a (forOthersToWork)(junitparams.internal.TestMethodTest)", description.getChildren().get(0).getDisplayName()); assertEquals("[1] b (forOthersToWork)(junitparams.internal.TestMethodTest)", description.getChildren().get(1).getDisplayName()); } + // Android-changed: CTS and AndroidJUnitRunner rely on specific format to test names, changing + // them will prevent CTS and AndroidJUnitRunner from working properly; see b/36541809 + @Ignore @Test public void hierarchicalArrayTestMethodStructure() throws Exception { System.clearProperty("JUnitParams.flat"); - Description description = arrayTestMethod.describe(); + Description description = arrayTestMethod.describableFrameworkMethod().getDescription(); assertEquals("forOthersToWorkWithArray", description.getDisplayName()); assertEquals("[0] a,b (forOthersToWorkWithArray)(junitparams.internal.TestMethodTest)", |