Skip to content

Commit

Permalink
junitparams own version of default value for Parameters#source() // #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bareja committed Jan 5, 2017
1 parent cd4fdba commit 37f8f4c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/main/java/junitparams/NullType.java
@@ -0,0 +1,4 @@
package junitparams;

public interface NullType {
}
11 changes: 5 additions & 6 deletions src/main/java/junitparams/Parameters.java
@@ -1,13 +1,12 @@
package junitparams;

import javax.lang.model.type.NullType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* THE annotation for the test parameters. Use it to say that a method takes
* some parameters and define how to obtain them.
*
*
* @author Pawel Lipinski
*/
@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -17,10 +16,10 @@
* a full parameter set, comma-separated or pipe-separated ('|').
* The values must match the method parameters in order and type.
* Whitespace characters are trimmed (use source class or method if You need to provide such parameters)
*
* <p>
* Example: <code>@Parameters({
* "1, joe, 26.4, true",
* "2, angie, 37.2, false"})</code>
* "1, joe, 26.4, true",
* "2, angie, 37.2, false"})</code>
*/
String[] value() default {};

Expand All @@ -41,7 +40,7 @@
* format of the data returned by the method is the same as for the source
* annotation class.
* Example: <code>@Parameters(method = "examplaryPeople")</code>
*
* <p>
* You can use multiple methods to provide parameters - use comma to do it:
* Example: <code>@Parameters(method = "womenParams, menParams")</code>
*/
Expand Down
@@ -1,9 +1,9 @@
package junitparams.internal.parameters;

import junitparams.Parameters;
import org.junit.runners.model.FrameworkMethod;

import javax.lang.model.type.NullType;
import junitparams.NullType;
import junitparams.Parameters;

class ParametersFromExternalClassMethod implements ParametrizationStrategy {
private ParamsFromMethodCommon paramsFromMethodCommon;
Expand Down
@@ -1,6 +1,5 @@
package junitparams.internal.parameters;

import javax.lang.model.type.NullType;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
Expand All @@ -10,6 +9,7 @@

import org.junit.runners.model.FrameworkMethod;

import junitparams.NullType;
import junitparams.Parameters;
import junitparams.internal.parameters.toarray.ParamsToArrayConverter;

Expand Down
@@ -1,9 +1,9 @@
package junitparams.internal.parameters;

import javax.lang.model.type.NullType;

import org.junit.runners.model.FrameworkMethod;

import junitparams.NullType;
import junitparams.Parameters;

class ParametersFromTestClassMethod implements ParametrizationStrategy {
Expand Down

0 comments on commit 37f8f4c

Please sign in to comment.