本文整理汇总了Java中org.junit.runners.Parameterized.Parameters方法的典型用法代码示例。如果您正苦于以下问题:Java Parameterized.Parameters方法的具体用法?Java Parameterized.Parameters怎么用?Java Parameterized.Parameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.junit.runners.Parameterized
的用法示例。
在下文中一共展示了Parameterized.Parameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: contains
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{index}: contains({0})")
public static Iterable<Object[]> data() {
return Arrays.asList(new Object[][]{
{"csar", true},
{"platform", true},
{"status", true},
{"transformation", true}
});
}
示例2: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{LogTester.LogType.VERBOSE, "Test", ""},
{LogTester.LogType.DEBUG, "Test", ""},
{LogTester.LogType.INFO, "Test", "I/LogTester: Test"},
{LogTester.LogType.WARN, "Test", "W/LogTester: Test"},
{LogTester.LogType.ERROR, "Test", "E/LogTester: Test"},
});
}
示例3: fixtures
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{0}")
public static List<Object[]> fixtures() {
String gitUrl = defaultSCMUrl + "_diff";
return Arrays.asList(new Object[][]{
{
"git url & branch matched",
new ProjectFixture()
.setSendBranches("refs/heads/foo")
.setScm(MockGitSCM.fromUrlAndBranchSpecs(defaultSCMUrl, Collections.singletonList(new BranchSpec("refs/heads/foo"))))
.setScmConfigs(scmConfigFactory.createERs(defaultSCMUrl, "refs/heads/foo"))
.setShouldStarted(true)
},
{
"git url match but branch not matched",
new ProjectFixture()
.setSendBranches("refs/heads/foo")
.setScm(MockGitSCM.fromUrlAndBranchSpecs(defaultSCMUrl, Collections.singletonList(new BranchSpec("refs/heads/foo"))))
.setScmConfigs(scmConfigFactory.createERs(defaultSCMUrl, "refs/heads/bar"))
.setShouldStarted(false)
},
{
"git url not match but branch matched",
new ProjectFixture()
.setSendBranches("refs/heads/foo")
.setScm(MockGitSCM.fromUrlAndBranchSpecs(defaultSCMUrl, Collections.singletonList(new BranchSpec("refs/heads/foo"))))
.setScmConfigs(scmConfigFactory.createERs(gitUrl, "refs/heads/foo"))
.setShouldStarted(false)
},
{
"no job scm configured",
new ProjectFixture()
.setSendBranches("refs/heads/foo")
.setScmConfigs(scmConfigFactory.createERs(defaultSCMUrl, "refs/heads/foo"))
.setShouldStarted(true)
},
});
}
示例4: memLatenciesBypasses
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
/** The memory latencies to test. */
@Parameterized.Parameters
public static Collection memLatenciesBypasses() {
// returns a Collection of Object[], each Object[] holds ctor arguments
List<Object[]> args = new LinkedList<>();
for (EnumSet<Bypass> mx : Arrays.asList(NO_BYPASS, EnumSet.of(MX))) {
for (Object aml : new Object[]{0, 1, 3}) {
args.add(new Object[]{aml, mx});
}
}
return args;
}
示例5: params
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection<Object[]> params() {
return Arrays.asList(new Object[][] {
{0, 0, "0"},
{1, 1, "1"},
{-5, -5, "-5"},
{488, 488, "488"},
{-876, -876, "-876"},
});
}
示例6: operations
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection operations() {
Object[][] ops = new Object[Operation.values().length][];
for (int i = 0; i < Operation.values().length; i++) {
ops[i] = new Object[]{Operation.values()[i]};
}
//To test one or a subset of operations do:
//return Arrays.asList(new Object[][]{ new Object[]{Operation.APPEND}});
return Arrays.asList(ops);
}
示例7: parameters
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection parameters() {
return Arrays.asList(new Object[][]{
new Object[] {Boolean.TRUE},
new Object[] {Boolean.FALSE},
});
}
示例8: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static @NotNull Iterable<CollectorRegistry> data() {
return Arrays.asList(
CollectorRegistry.defaultRegistry,
new CollectorRegistry(false) // custom registry
);
}
示例9: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static List<Object[]> data() {
return Arrays.asList(new Object[REPEAT_COUNT][0]);
}
示例10: races
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{0}")
public static Collection races() {
return Arrays.asList(new Object[][]{
{"MAIDEN - Quarter Horse",
new RaceTypeNameBlackTypeBreed("MAIDEN", QUARTER_HORSE)},
{"MAIDEN SPECIAL WEIGHT - Thoroughbred",
new RaceTypeNameBlackTypeBreed("MAIDEN SPECIAL WEIGHT",
THOROUGHBRED)},
{"STAKES Mount Elbert S. - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "Mount Elbert S.",
THOROUGHBRED)},
{"STAKES Juvenile Turf Sprint S. Listed - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "Juvenile Turf Sprint S.",
"Listed", THOROUGHBRED)},
{"STAKES Golden State Juvenile S. Black Type - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "Golden State Juvenile S.",
"Black Type", THOROUGHBRED)},
{"STAKES Senator Ken Maddy S. Grade 3 - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "Senator Ken Maddy S.", 3,
"Grade 3", THOROUGHBRED)},
{"STAKES Breeders' Cup Classic Grade 1 - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "Breeders' Cup Classic", 1,
"Grade 1", THOROUGHBRED)},
{"STAKES 14 Hands Winery Breeders' Cup Juvenile Fillies Grade 1 - " +
"Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "14 Hands Winery " +
"Breeders' Cup Juvenile Fillies", 1, "Grade 1",
THOROUGHBRED)},
{"DERBY Prairie Meadows Derby Challenge - Quarter Horse",
new RaceTypeNameBlackTypeBreed("DERBY", "Prairie Meadows Derby " +
"Challenge", QUARTER_HORSE)},
{"STAKES CTBA Derby - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "CTBA Derby",
THOROUGHBRED)},
{"STAKES WA Cup Two Year Old Colts and Geldings S. Presented by Redhook " +
"ESL Black Type - Thoroughbred",
new RaceTypeNameBlackTypeBreed("STAKES", "WA Cup Two Year Old " +
"Colts and Geldings S. Presented by Redhook ESL", null,
"Black Type", THOROUGHBRED)},
{"Claiming stake Big Country 93.1 XX FM Deal or No Deal S. - Thoroughbred",
new RaceTypeNameBlackTypeBreed("CLAIMING STAKES", "Big Country " +
"93.1 XX FM Deal or No Deal S.", null, null, THOROUGHBRED)},
{"HANDICAP STAKES James S. Smith Memorial H. - Quarter Horse",
new RaceTypeNameBlackTypeBreed("HANDICAP STAKES", "James S. Smith" +
" Memorial H.", null, null, QUARTER_HORSE)},
{"STAKES Ajc California S. - Colts & Geldings - Arabian",
new RaceTypeNameBlackTypeBreed("STAKES", "Ajc California S. - " +
"Colts & Geldings", null, null, ARABIAN)}
}
);
}
示例11: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{0}")
public static List<ManagedCollection> data() {
return Arrays.asList(ManagedCollection.values());
}
示例12: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection<PatchTestCase> data() throws IOException {
return PatchTestCase.load("replace");
}
示例13: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
/** Subclasses should override this method to provide real data parameters. */
@Parameterized.Parameters
public static Collection<Object[]> data() throws IOException {
return Collections.emptyList();
}
示例14: mapClasses
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{index} - {0}")
public static Iterable<Object[]> mapClasses() {
return Arrays.asList(new Object[][]{
{RMap.class}, {RMapCache.class}
});
}
示例15: data
import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{0}")
public static Collection<Object[]> data() throws IOException {
return ParametersProvider.getParameters("blargg/cgb_sound");
}