当前位置: 首页>>代码示例>>Java>>正文


Java Parameterized.Parameters方法代码示例

本文整理汇总了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}
    });
}
 
开发者ID:StuPro-TOSCAna,项目名称:TOSCAna,代码行数:10,代码来源:HelpTest.java

示例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"},
    });
}
 
开发者ID:LachlanMcKee,项目名称:timber-junit-rule,代码行数:11,代码来源:LogTestWithMinPriorityRules.java

示例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)
        },
    });
}
 
开发者ID:riboseinc,项目名称:aws-codecommit-trigger-plugin,代码行数:38,代码来源:JenkinsERIT.java

示例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;
}
 
开发者ID:upenn-acg,项目名称:cis501,代码行数:13,代码来源:InorderPipelineFullTest.java

示例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"},
    });
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:IntegerInsertActionTest.java

示例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);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:BaseTestHttpFSWith.java

示例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},
    });
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:8,代码来源:Bug53367.java

示例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
  );
}
 
开发者ID:nolequen,项目名称:vertx-prometheus-metrics,代码行数:8,代码来源:ExposeTest.java

示例9: data

import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static List<Object[]> data() {
    return Arrays.asList(new Object[REPEAT_COUNT][0]);
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:5,代码来源:AbstractAbortingMalcolmTest.java

示例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)}
            }
    );
}
 
开发者ID:robinhowlett,项目名称:chart-parser,代码行数:52,代码来源:RaceTypeNameBlackTypeBreedTest.java

示例11: data

import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters(name = "{0}")
public static List<ManagedCollection> data() {
    return Arrays.asList(ManagedCollection.values());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:ManagedRealmCollectionTests.java

示例12: data

import org.junit.runners.Parameterized; //导入方法依赖的package包/类
@Parameterized.Parameters
public static Collection<PatchTestCase> data() throws IOException {
    return PatchTestCase.load("replace");
}
 
开发者ID:beyondeye,项目名称:kjsonpatch,代码行数:5,代码来源:ReplaceOperationTest.java

示例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();
}
 
开发者ID:apache,项目名称:incubator-ratis,代码行数:6,代码来源:ParameterizedBaseTest.java

示例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}
    });
}
 
开发者ID:qq1588518,项目名称:JRediClients,代码行数:7,代码来源:RedissonMapReduceTest.java

示例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");
}
 
开发者ID:trekawek,项目名称:coffee-gb,代码行数:5,代码来源:CgbSoundTest.java


注:本文中的org.junit.runners.Parameterized.Parameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。