Skip to content

Commit

Permalink
add example of usage @NamedParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
woprzech committed Apr 27, 2017
1 parent fe8b3b6 commit a5c330d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/test/java/junitparams/usage/SamplesOfUsageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
import java.util.Iterator;
import java.util.List;

import junitparams.*;
import org.junit.Test;
import org.junit.runner.RunWith;

import junitparams.FileParameters;
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import junitparams.ParametersReaderProvidersTest;
import junitparams.ParamsConverterTest;
import junitparams.converters.Param;
import junitparams.custom.combined.CombinedParameters;
import junitparams.mappers.CsvWithHeaderMapper;
Expand Down Expand Up @@ -49,6 +45,14 @@ private Object named1() {
return new Object[]{"AAA", 1};
}

@Test
@Parameters(named = "return 1")
public void paramsInNamedParameters(int number) { }
@NamedParameters("return 1")
private Integer[] customNamedParameters() {
return new Integer[] { 1 };
}

@Test
@Parameters(method = "named2,named3")
public void paramsInMultipleMethods(String p1, Integer p2) { }
Expand Down

0 comments on commit a5c330d

Please sign in to comment.