Class TestParameters.TestParametersValues.Builder
- java.lang.Object
-
- com.google.testing.junit.testparameterinjector.TestParameters.TestParametersValues.Builder
-
- Enclosing class:
- TestParameters.TestParametersValues
public static final class TestParameters.TestParametersValues.Builder extends Object
Builder forTestParameters.TestParametersValues
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestParameters.TestParametersValues.Builder
addParameter(String parameterName, Object value)
Adds a parameter by its name.TestParameters.TestParametersValues.Builder
addParameters(Map<String,Object> parameterNameToValueMap)
Adds parameters by thris names.TestParameters.TestParametersValues
build()
TestParameters.TestParametersValues.Builder
name(String name)
Sets a name for this set of parameters that will be used for describing this test.
-
-
-
Method Detail
-
name
public TestParameters.TestParametersValues.Builder name(String name)
Sets a name for this set of parameters that will be used for describing this test.Setting a name is optional. If unset, one will be generated from the parameter values.
Example: If a test method is called "personIsAdult" and this name is "teenager", the name of the resulting test will be "personIsAdult[teenager]".
-
addParameter
public TestParameters.TestParametersValues.Builder addParameter(String parameterName, @Nullable Object value)
Adds a parameter by its name.- Parameters:
parameterName
- The name of the parameter of the test methodvalue
- A value of the same type as the method parameter
-
addParameters
public TestParameters.TestParametersValues.Builder addParameters(Map<String,Object> parameterNameToValueMap)
Adds parameters by thris names.
-
build
public TestParameters.TestParametersValues build()
-
-