當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。