-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from Pragmatists/mattmook-master
Fix for #134 - Mattmook master with some fixes
- Loading branch information
Showing
4 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
30 changes: 30 additions & 0 deletions
30
src/test/java/junitparams/internal/ParameterisedTestClassRunnerTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package junitparams.internal; | ||
|
||
import junitparams.Parameters; | ||
import org.junit.Test; | ||
import org.junit.runner.Description; | ||
import org.junit.runners.model.FrameworkMethod; | ||
import org.junit.runners.model.TestClass; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class ParameterisedTestClassRunnerTest { | ||
|
||
@Test | ||
public void shouldGetNullDescriptionForMethodNotYetInvoked() throws Exception { | ||
ParameterisedTestClassRunner runner = new ParameterisedTestClassRunner(new TestClass(SampleTest.class)); | ||
runner.returnListOfMethods(); | ||
|
||
Description test = runner.getDescriptionFor(new FrameworkMethod(SampleTest.class.getMethod("parametrized", String.class))); | ||
|
||
assertThat(test).isNull(); | ||
} | ||
|
||
static class SampleTest { | ||
@Test | ||
@Parameters({ "123", "456" }) | ||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public void parametrized(String param) { | ||
} | ||
} | ||
} |