Java 类org.junit.runners.Parameterized.Parameters 实例源码

项目:GitHub    文件:FormatRuleTest.java   
@Parameters
public static Collection<Object[]> data() {
    return asList(new Object[][] {
            { "date-time", Date.class },
            { "date", String.class },
            { "time", String.class },
            { "utc-millisec", Long.class },
            { "regex", Pattern.class },
            { "color", String.class },
            { "style", String.class },
            { "phone", String.class },
            { "uri", URI.class },
            { "email", String.class },
            { "ip-address", String.class },
            { "ipv6", String.class },
            { "host-name", String.class },
            { "uuid", UUID.class }});
}
项目:JWebAssembly    文件:MathOperations.java   
@Parameters(name="{0}-{1}")
public static Collection<Object[]> data() {
    ArrayList<Object[]> list = new ArrayList<>();
    for( Object[] val : ScriptEngine.testParams() ) {
        ScriptEngine script = (ScriptEngine)val[0];
        addParam( list, script, "intConst" );
        addParam( list, script, "floatConst" );
        addParam( list, script, "doubleConst" );
        addParam( list, script, "addInt", 1, 3 );
        addParam( list, script, "addLong" );
        addParam( list, script, "addFloat", 1F, 3.5F );
        addParam( list, script, "addDouble", 1.0, 3.5 );
        addParam( list, script, "subInt", 1, 3 );
        addParam( list, script, "subLong" );
        addParam( list, script, "subFloat", 1F, 3.5F );
        addParam( list, script, "subDouble", 1.0, 3.5 );
        addParam( list, script, "mulDivInt" );
        addParam( list, script, "mulDivLong" );
        addParam( list, script, "mulDivFloat" );
        addParam( list, script, "mulDivDouble" );
        addParam( list, script, "intBits" );
        addParam( list, script, "longBits" );
    }
    return list;
}
项目:quilt    文件:OerUint8CodecTest.java   
/**
 * The data for this test...
 */
@Parameters
public static Collection<Object[]> data() {
  return Arrays.asList(new Object[][]{
      // Input Value as a int; Expected byte[] in ASN.1
      // 0
      {0, BaseEncoding.base16().decode("00")},
      // 1
      {1, BaseEncoding.base16().decode("01")},
      // 2
      {2, BaseEncoding.base16().decode("02")},
      // 3
      {127, BaseEncoding.base16().decode("7F")},
      // 4
      {128, BaseEncoding.base16().decode("80")},
      // 5
      {254, BaseEncoding.base16().decode("FE")},
      // 6
      {255, BaseEncoding.base16().decode("FF")},});
}
项目:lttng-scope    文件:DecimalUnitFormatFactorTest.java   
/**
 * @return The arrays of parameters
 */
@Parameters(name = "{index}: {0}")
public static Iterable<Object[]> getParameters() {
    return Arrays.asList(new Object[][] {
            { 0, "0", 10.0 },
            { 3, "300", 100.0 },
            { 975, "97.5", 0.1 },
            { 1000, "1 k", 1.0 },
            { 4000, "40", 0.01 },
            { -4000, "-40", 0.01 },
            { -0.04, "-4", 100.0 },
            { 0.002, "20", 10000.0 },
            { 0.0555, "5.5 k", 100000.0 },
            { 0.0004928373928, "49.3 n", 0.0001 },
            { 0.000000251, "251 p", 0.001 },
            { Double.POSITIVE_INFINITY, "∞", 0.001 },
            { Double.MAX_VALUE, "4", Double.MIN_NORMAL},
    });
}
项目:cf-mta-deploy-service    文件:DomainValidatorTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0)
            { "TEST_TEST_TEST", false, "test-test-test", },
            // (1)
            { "test-test-test", true , "test-test-test", },
            // (2)
            { "test.test.test", true , "test.test.test", },
            // (3)
            { "---", false, "E:Could not create a valid domain from \"---\"", },
            // (4)
            { "@12", false, "12", },
            // (5)
            { "@@@", false, "E:Could not create a valid domain from \"@@@\"", },
// @formatter:on
        });
    }
项目:r8    文件:InvalidFieldNames.java   
@Parameters
public static Collection<Object[]> data() {
  return Arrays.asList(new Object[][] {
      { new String(new int[] { 0x00a0 }, 0, 1), true },
      { new String(new int[] { 0x2000 }, 0, 1), true },
      { new String(new int[] { 0x200f }, 0, 1), true },
      { new String(new int[] { 0x2028 }, 0, 1), true },
      { new String(new int[] { 0x202f }, 0, 1), true },
      { new String(new int[] { 0xd800 }, 0, 1), true },
      { new String(new int[] { 0xdfff }, 0, 1), true },
      { new String(new int[] { 0xfff0 }, 0, 1), true },
      { new String(new int[] { 0xffff }, 0, 1), true },
      { "a/b", false },
      { "<a", false },
      { "a>", true },
      { "a<b>", true },
      { "<a>b", true }
  });
}
项目:cf-mta-deploy-service    文件:UserProvidedResourceResolverTest.java   
@Parameters
    public static Collection<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            {
                "mtad-09.yaml", "/mta/targets-v2.json", "/mta/platform-types-v2.json", "R:mtad-09.yaml.json",
            },
            {
                "mtad-10.yaml", "/mta/targets-v2.json", "/mta/platform-types-v2.json", "R:mtad-10.yaml.json",
            },
            {
                "mtad-11.yaml", "/mta/targets-v2.json", "/mta/platform-types-v2.json", "R:mtad-11.yaml.json",
            },
// @formatter:on
        });
    }
项目:cf-mta-deploy-service    文件:VisibilityValidatorTest.java   
@Parameters
public static Iterable<Object[]> getParameters() {
    return Arrays.asList(new Object[][] {
// @formatter:off
        // (0)
        { "[{\"org\":\"org1\",\"space\":\"space1\"}]", true, },
        // (1)
        { "[{\"org\":\"org1\",\"space\":\"space1\"},{\"org\":\"org2\",\"space\":\"space2\"}]", true, },
        // (2) Test with only org without space:
        { "[{\"org\":\"org1\"}]", true, },
        // (3) Test with random object
        { "randomString", false, },
        // (4) Test with only space without org:
        { "[{\"space\":\"space1\"}]", false, },
        // (5) Not a List
        { "{\"org\":\"org1\",\"space\":\"space1\"}", false, },
        // (6) Test with org that is integer:
        { "[{\"org\": 3,\"space\":\"space1\"}]", false, },
        // (7) Test with space that is integer:
        { "[{\"org\":\"org1\",\"space\": 3}]", false, },
        // (8) Test with org and space that are integers:
        { "[{\"org\": 3,\"space\": 3}]", false, },
// @formatter:on
    });
}
项目:cf-mta-deploy-service    文件:ScaleAppStepTest.java   
@Parameters
public static Iterable<Object[]> getParameters() {
    return Arrays.asList(new Object[][] {
        // @formatter:off
        {
            new SimpleApplication("test-app-1", 2), new SimpleApplication("test-app-1", 3),
        },
        {
            new SimpleApplication("test-app-1", 2), new SimpleApplication("test-app-1", 2),
        },
        {
            new SimpleApplication("test-app-1", 2), null,
        },
        // @formatter:on
    });
}
项目:cf-mta-deploy-service    文件:ServiceUpdaterTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) Service with a changed plan
            {
                "service-update-01.json", null, null
            },
            // (1) With non-existing service
            {
                "service-update-02.json", "404 Not Found: Service 'com.sap.sample.mta.test' not found", CloudFoundryException.class
            },
            // (2) With non-existing service plan
            {
                "service-update-03.json", "Could not create service instance com.sap.sample.mta.test. Service plan test-new-plan for service some-label not found", SLException.class
            }
// @formatter:on
        });
    }
项目:https-github.com-apache-zookeeper    文件:PortAssignmentTest.java   
@Parameters
public static Collection<Object[]> data() {
    return Arrays.<Object[]>asList(
            new Object[] { "8", "threadid=1", 11221, 13913 },
            new Object[] { "8", "threadid=2", 13914, 16606 },
            new Object[] { "8", "threadid=3", 16607, 19299 },
            new Object[] { "8", "threadid=4", 19300, 21992 },
            new Object[] { "8", "threadid=5", 21993, 24685 },
            new Object[] { "8", "threadid=6", 24686, 27378 },
            new Object[] { "8", "threadid=7", 27379, 30071 },
            new Object[] { "8", "threadid=8", 30072, 32764 },
            new Object[] { "1", "threadid=1", 11221, 32767 },
            new Object[] { "2", "threadid=1", 11221, 21993 },
            new Object[] { "2", "threadid=2", 21994, 32766 },
            new Object[] { null, null, 11221, 32767 },
            new Object[] { "", "", 11221, 32767 });
}
项目:PEF    文件:TestFFX.java   
@Parameters(name = "FFX input: {0} - radix: {1} - bound: {2}")
public static Object[][] data() throws DecoderException {
    return new Object[][]{
        {new FFXInput(new byte[16], new byte[0]), 2, 512},
        {new FFXInput(new byte[16], new byte[0]), 21, 128},
        {new FFXInput(new byte[16], new byte[0]), 36, 64},

        {new FFXInput(new byte[16], new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9}), 13, 13000},
        {new FFXInput(new byte[16], new byte[]{(byte) 0xC1, 24}), 17, 1024},
        {new FFXInput(new byte[16], new byte[]{2}), 2, 1024},

        {new FFXInput(new byte[]{11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11}, new byte[]{(byte) 0F, 32}), 22, 640},
        {new FFXInput(new byte[]{(byte) 0xEF, 0x22, (byte) 0xA0, (byte) 0xA6, 0x79, 0x5D, (byte) 0xCC, 0x22, 0x12, (byte) 0xA1, 0x33, 0x12, (byte) 0xE9, 0x00, 0x10, 0x2E}, new byte[]{0, 0}), 2, 512},
        {new FFXInput(new byte[]{0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, (byte) 0x89, (byte) 0x9A, (byte) 0xAB, (byte) 0xBC, (byte) 0xCD, (byte) 0xDE, (byte) 0xEF, (byte) 0xF0}, new byte[0]), 2, 512},

        {new FFXInput(getRandomBytes(16), getRandomBytes(3)), 2, 512},
        {new FFXInput(getRandomBytes(16), getRandomBytes(7)), 3, 12345},
        {new FFXInput(getRandomBytes(16), getRandomBytes(0)), 17, 128},
        {new FFXInput(getRandomBytes(16), getRandomBytes(18)), 24, 64},
        {new FFXInput(getRandomBytes(16), getRandomBytes(2)), 31, 32}
    };
}
项目:osc-core    文件:SyncPolicyMetaTaskTest.java   
@Parameters()
public static Collection<Object[]> getTestData() {
    return Arrays.asList(new Object[][] {
        {NO_DOMAIN_MC, emptyGraph(NO_DOMAIN_MC)},
        {NO_MGR_POLICY_MC, emptyGraph(NO_MGR_POLICY_MC)},
        {MGR_POLICY_WITHOUT_POLICY_MC, createPolicyGraph(MGR_POLICY_WITHOUT_POLICY_MC)},
        {MGR_POLICY_WITH_POLICY_MC, updatePolicyGraph(MGR_POLICY_WITH_POLICY_MC)},
        {POLICY_WITHOUT_MGR_POLICY_MC, deletePolicyGraph(POLICY_WITHOUT_MGR_POLICY_MC)},
        // TODO hailee: Looks like the test below is still failing inconsistently.
        //{DOMAINS_WITH_ORPHAN_AND_OUT_OF_SYNC_POLICIES_MC,
        //   deleteOrphanAndVSPoliciesGraph(DOMAINS_WITH_ORPHAN_AND_OUT_OF_SYNC_POLICIES_MC)},
        //{DOMAINS_WITHOUT_POLICIES_AND_WITH_ORPHAN_POLICIES_MC,
        //  deletePoliciesWithoutMgrPoliciesGraph(DOMAINS_WITHOUT_POLICIES_AND_WITH_ORPHAN_POLICIES_MC)},
        {DOMAIN_WITH_MULTIPLE_POLICIES_MC, deletePoliciesFromDomainGraph(DOMAIN_WITH_MULTIPLE_POLICIES_MC)}
    });
}
项目:imputedb    文件:CleanTest.java   
@Parameters(name = "{index}: {0}")
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][] {
        { "SELECT BLD FROM acs;" },
        { "SELECT BLD as units_in_structure, COUNT(ST) as estimate FROM acs GROUP BY BLD;" },
        { "SELECT BATH as has_bath, COUNT(ST) as ct FROM acs GROUP BY BATH;" },
        { "SELECT ACR as lotsize, AVG(BDSP) as avg_num_bedrooms FROM acs GROUP BY ACR;" },
        { "SELECT PSF as has_sub_families, SUM(NP) as num_people FROM acs GROUP BY PSF;" },
        { "SELECT AVG(NP) as avg_num_people FROM acs;" },
        { "SELECT BDSP as num_bedrooms, AVG(ACR) as avg_lot_size FROM acs WHERE VEH >= 2 GROUP BY BDSP;" },
        { "SELECT MIN(YBL) as earliest_built_bucket FROM acs WHERE ACR = 3;" },
        { "SELECT MIN(RMSP) as min_num_rooms FROM acs WHERE RWAT=2;" },
        { "SELECT * FROM acs WHERE REFR = 1 AND STOV = 1 AND TEL = 1 AND TOIL = 2;" },
        // simpledb cannot handle predicates vs other columns (only relative to constants)
        { "SELECT * FROM acs WHERE VEH >= 1 AND VEH <= 5 AND RMSP > 4;" }
    });
}
项目:cas4.0.x-server-wechat    文件:LdapAuthenticationHandlerTests.java   
@Parameters
public static Collection<Object[]> getParameters() {
    return Arrays.asList(new Object[][] {
            {
                    LdapTestUtils.DirectoryType.ActiveDirectory,
                    false,
                    new String[] {"/ldap-provision-context.xml", "/ad-authn-test.xml"},
            },
            {
                    LdapTestUtils.DirectoryType.OpenLdap,
                    true,
                    new String[] {"/ldap-provision-context.xml", "/openldap-searchbind-authn-test.xml"},
            },
            {
                    LdapTestUtils.DirectoryType.OpenLdap,
                    true,
                    new String[] {"/ldap-provision-context.xml", "/openldap-anonsearchbind-authn-test.xml"},
            },
            {
                    LdapTestUtils.DirectoryType.OpenLdap,
                    false,
                    new String[] {"/ldap-provision-context.xml", "/openldap-directbind-authn-test.xml"},
            },
    });
}
项目:cf-mta-deploy-service    文件:DeployTargetDaoTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) Add new deploy target:
            {
                 new AddInput("/platform/platform-v1-1.json"), "Deploy target with name \"DEPLOY-TARGET-TEST-1\" already exists"
            },
            // (1) Remove deploy target:
            {
                 new RemoveInput(0), "Deploy target with id \"0\" does not exist"
            },
            // (2) Merge deploy targets
            {
                new MergeInput("/platform/platform-v1-2.json"), null
            },
// @formatter:on
        });
    }
项目:cf-mta-deploy-service    文件:AddDomainsStepTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) Attempt to add non-existing custom domains:
            {
                Arrays.asList("foo", "bar"), Arrays.asList("baz", "qux"),
            },
            // (1) Attempt to add existing custom domains:
            {
                Arrays.asList("foo", "bar"), Arrays.asList("foo", "bar"),
            },
            // (2) Attempt to add a mix of existing and non-existing custom domains:
            {
                Arrays.asList("foo", "bar"), Arrays.asList("foo", "baz"),
            },
// @formatter:on
        });
    }
项目:firebase-admin-java    文件:FirebaseAuthTest.java   
@Parameters
public static Collection<Object[]> data() throws Exception {
  // Initialize this test suite with all available credential implementations.
  return Arrays.asList(
      new Object[][] {
        {
          new FirebaseOptions.Builder().setCredentials(createCertificateCredential()).build(),
          /* isCertCredential */ true
        },
        {
          new FirebaseOptions.Builder().setCredentials(createRefreshTokenCredential()).build(),
          /* isCertCredential */ false
        },
        {
          new FirebaseOptions.Builder()
              .setCredentials(createApplicationDefaultCredential())
              .build(),
          /* isCertCredential */ false
        },
        {
          new FirebaseOptions.Builder().setCredential(
              createFirebaseCertificateCredential()).build(),
          /* isCertCredential */ true
        },
        {
          new FirebaseOptions.Builder().setCredential(
              createFirebaseRefreshTokenCredential()).build(),
          /* isCertCredential */ false
        },
      });
}
项目:cf-mta-deploy-service    文件:SetAppsUrisStepTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) There are temporary URIs:
            {
                "apps-to-deploy-04.json", "R:apps-to-deploy-10.json",
            },
            // (1) There are no temporary URIs:
            {
                "apps-to-deploy-06.json", "R:apps-to-deploy-07.json",
            },
// @formatter:on
        });
    }
项目:scanning    文件:TopicAndQueueNameTest.java   
@Parameters
  public static Collection<String[]> data() {
      return Arrays.asList(new String[][] {
{"STATUS_TOPIC", "org.eclipse.scanning.status.topic", STATUS_TOPIC},
{"SUBMISSION_QUEUE", "org.eclipse.scanning.submission.queue", SUBMISSION_QUEUE},
{"STATUS_SET", "org.eclipse.scanning.status.set", STATUS_SET},
{"DEVICE_REQUEST_TOPIC", "org.eclipse.scanning.request.device.topic", DEVICE_REQUEST_TOPIC},
{"DEVICE_RESPONSE_TOPIC", "org.eclipse.scanning.response.device.topic", DEVICE_RESPONSE_TOPIC},
{"POSITION_TOPIC", "org.eclipse.scanning.request.position.topic", POSITION_TOPIC},
{"POSITIONER_REQUEST_TOPIC", "org.eclipse.scanning.request.positioner.topic", POSITIONER_REQUEST_TOPIC},
{"POSITIONER_RESPONSE_TOPIC", "org.eclipse.scanning.response.positioner.topic", POSITIONER_RESPONSE_TOPIC},
{"ACQUIRE_REQUEST_TOPIC", "org.eclipse.scanning.request.acquire.topic", ACQUIRE_REQUEST_TOPIC},
{"ACQUIRE_RESPONSE_TOPIC", "org.eclipse.scanning.response.acquire.topic", ACQUIRE_RESPONSE_TOPIC}
         });
  }
项目:hadoop    文件:TestNativeCrc32.java   
@Parameters
public static Collection<Object[]> data() {
  Collection<Object[]> params = new ArrayList<Object[]>(2);
  params.add(new Object[] { DataChecksum.Type.CRC32 });
  params.add(new Object[] { DataChecksum.Type.CRC32C });
  return params;
}
项目:cf-mta-deploy-service    文件:UpdateSubscribedServiceBrokerStepTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) With an application that matches to an existing service broker
            {
                "update-subscribed-service-broker-input-00.json", null, null
            },
            // (1) With an application that does not-matches to an existing service broker
            {
                "update-subscribed-service-broker-input-01.json", null, "Service broker with name \"test-broker\" does not exist"
            },
            // (2) With an application that has no password defined
            {
                "update-subscribed-service-broker-input-02.json", "Missing service broker password for application \"test-application\"", null
            },
            // (3) With an application that broker does not match any existing broker
            {
                "update-subscribed-service-broker-input-03.json", null, "Service broker with name \"test-broker-which-does-not-exist\" does not exist"
            },
            // (4) With an application which broker was deleted
            {
                "update-subscribed-service-broker-input-04.json", null, "Service broker with name \"test-broker\" does not exist"
            },
// @formatter:on
        });
    }
项目:finmath-lib-cuda-extensions    文件:MonteCarloBlackScholesModelTest.java   
@Parameters
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][] {
            { "BrownianMotion" },                           // Text case 1: Java implementation
            { "BrownianMotionJavaRandom" },                 // Text case 2: Java implementation
            { "BrownianMotionCudaWithHostRandomVariable" }, // Text case 3: Java implementation
            { "BrownianMotionCudaWithRandomVariableCuda" }  // Text case 4: Java implementation         
    });
}
项目:cf-mta-deploy-service    文件:ApplicationStartupStateCalculatorTest.java   
@Parameters
public static Iterable<Object[]> getParameters() {
    return Arrays.asList(new Object[][] {
        // @formatter:off
        // (0)
        {
            "started-app.json", ApplicationStartupState.STARTED,
        },
        // (1)
        {
            "stopped-app.json", ApplicationStartupState.STOPPED,
        },
        // (2) The number of running instances is different than the number of total instances:
        {
            "app-in-inconsistent-state-0.json", ApplicationStartupState.INCONSISTENT,
        },
        // (3) The number of running instances is not zero when the requested state is stopped:
        {
            "app-in-inconsistent-state-1.json", ApplicationStartupState.INCONSISTENT,
        },
        // (4) The number of running and the number of total instances is zero, but the requested state is started:
        {
            "app-in-inconsistent-state-2.json", ApplicationStartupState.INCONSISTENT,
        },
        // (5) The number of running instances is bigger than the number of total instances:
        {
            "app-in-inconsistent-state-3.json", ApplicationStartupState.INCONSISTENT,
        },
        // @formatter:on
    });
}
项目:osc-core    文件:ConformK8sDeploymentPodsMetaTaskTest.java   
@Parameters()
public static Collection<Object[]> getTestData() {
    return Arrays.asList(new Object[][] {
        {DS_NO_DAI_ORPHAN_PODS, conformOrphanK8sPodsAsDaisGraph(DS_NO_DAI_ORPHAN_PODS)},
        {DS_ORPHAN_DAIS_NO_PODS, conformOrphanDaisGraph(DS_ORPHAN_DAIS_NO_PODS)},
        {DS_SOME_ORPHAN_DAIS_SOME_ORPHAN_PODS, conformOrphanDaisAndOrphanPodsGraph(DS_SOME_ORPHAN_DAIS_SOME_ORPHAN_PODS)},
        {DS_DAIS_PODS_MATCHING, conformDaisMatchingPodsGraph(DS_DAIS_PODS_MATCHING)},
    });
}
项目:hadoop    文件:TestKerberosAuthenticator.java   
@Parameterized.Parameters
public static Collection booleans() {
  return Arrays.asList(new Object[][] {
    { false },
    { true }
  });
}
项目:cf-mta-deploy-service    文件:AuthorizationUtilTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) User has access
            {
                true, true, null
            },
            // (1) User has access but no permissions
            {
                true, false, null
            },
            // (2) Fail with 400 Bad Request:
            {
                true, true, new HttpClientErrorException(HttpStatus.BAD_REQUEST)
            },
            // (3) User has permissions but no access
            {
                false, true, null
            },
            // (4) User has no permissions and no access
            {
                false, false, null
            }
// @formatter:on
        });
    }
项目:sling-org-apache-sling-launchpad-integration-tests    文件:PostServletDeleteParentTest.java   
@Parameters(name="{0}")
public static Collection<Object[]> data() {
    final List<Object []> result = new ArrayList<Object []>();
    result.add(new Object[] { "test.other/nothing" });
    result.add(new Object[] { "test.other" });
    result.add(new Object[] { "test.html" });
    result.add(new Object[] { "test/some.node.html" });
    result.add(new Object[] { "test/some.node.selector.html" });
    result.add(new Object[] { "test/some.node.selector.html/another" });
    return result;
}
项目:PEF    文件:TestPCAPThreading.java   
@Parameters(name = "file: {0}")
public static Iterable<? extends Object> data() {
    return Arrays.asList(
                         "1tcpdnsseg.pcap",
                         "1tcpdns.pcap",
                         "1tcpdnsaxfr.pcap",
                         "1udpssdp.pcap",
                         "1ipv6hopbyhophttp.pcap",
                         "1netflowipfixv10.pcap",
                         "1iptunneling.pcap",
                         "1db-lsp-disc.pcap",
                         "1snmp.pcap",
                         "1nat-pmp.pcap");
}
项目:green-coffee-example    文件:DetailsFeatureTest.java   
@Parameters(name = "{0}")
public static Iterable<ScenarioConfig> scenarios() throws IOException
{
    return new GreenCoffeeConfig("testapp")
            .withFeatureFromAssets("assets/details.feature")
            .scenarios(ENGLISH, SPANISH);
}
项目:cf-mta-deploy-service    文件:DeleteServiceBrokersStepTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            // (0) One service broker  should be deleted:
            {
                "delete-service-brokers-step-input-01.json", new String[] { "foo-broker", }, null, null,
            },
            // (1) No service brokers to delete:
            {
                "delete-service-brokers-step-input-02.json", new String[] {}, null, null,
            },
            // (2) Two service brokers should be deleted:
            {
                "delete-service-brokers-step-input-03.json", new String[] { "foo-broker", "bar-broker", }, null, null,
            },
            // (3) One service broker should be deleted, but it doesn't exist:
            {
                "delete-service-brokers-step-input-04.json", new String[] {}, null, null,
            },
            // (4) A module that provides a service broker was renamed (the service broker was updated):
            {
                "delete-service-brokers-step-input-05.json", new String[] {}, null, null,
            },
            // (5) One service broker  should be deleted, but an exception is thrown by the client:
            {
                "delete-service-brokers-step-input-01.json", new String[] {}, "Controller operation failed: 418 I'm a teapot", new CloudFoundryException(HttpStatus.I_AM_A_TEAPOT),
            },
            // (6) Service broker should not be deleted and an exception should be thrown, because the user is not an admin and failsafe option is not set:
            {
                "delete-service-brokers-step-input-01.json", new String[] { "foo-broker", }, "Controller operation failed: 403 Forbidden", new CloudFoundryException(HttpStatus.FORBIDDEN),
            },
            // (7) Service broker should not be deleted without an exception, because the user is not an admin and failsafe option is set:
            {
                "delete-service-brokers-step-input-01.json", new String[] { "foo-broker", }, null, new CloudFoundryException(HttpStatus.FORBIDDEN),
            },
// @formatter:on
        });
    }
项目:osc-core    文件:ConformK8sDeploymentSpecInspectionPortsMetaTaskTest.java   
@Parameters()
public static Collection<Object[]> getTestData() {
    return Arrays.asList(new Object[][] {
        {DS_WITH_ONLY_ORPHAN_DAIS, deleteDAIsInspectionPortGraph(DS_WITH_ONLY_ORPHAN_DAIS)},
        {DS_WITHOUT_ORPHAN_DAIS, registerDAIsInspectionPortGraph(DS_WITHOUT_ORPHAN_DAIS)},
        {DS_NO_DAIS, emptyGraph()},
    });
}
项目:lttng-scope    文件:TimeGraphWidgetStatesTest.java   
/**
 * Generator for test parameters.
 *
 * @return Test parameters
 */
@Parameters(name = "resolution: {0}")
public static Iterable<Object[]> getParameters() {
    return Arrays.asList(
            new Object[] { 1 },
            new Object[] { 2 },
            new Object[] { 5 },
            new Object[] { 10 },
            new Object[] { 50 },
            new Object[] { 100 }
            );
}
项目:dremio-oss    文件:TestTableauMessageBodyGenerator.java   
@Parameters(name="{0}")
public static final Object[] getTestCases() {
  return new Object[] {
    new String[] { "basic", "UNTITLED.tmp", "[UNTITLED].[tmp]" },
    new String[] { "subfolder", "spaceA.foo.tmp", "[spaceA.foo].[tmp]" },
    new String[] { "dot-in-name", "spaceA.\"tmp.json\"", "[spaceA].[tmp.json]" },
    new String[] { "home-dataset", "@dremio.tmp", "[@dremio].[tmp]" },
    new String[] { "weird-name", "spaceA.[foo][bar]", "[spaceA].[[foo]][bar]]]" },
    new String[] { "weird-schema", "spaceA.[whynot].tmp", "[spaceA.[whynot]]].[tmp]" }
  };
}
项目:springbootWeb    文件:JavaCodeGenerationTest.java   
@Parameters
public static List<GeneratedJavaFile> generateJavaFiles() throws Exception {
    List<GeneratedJavaFile> generatedFiles = new ArrayList<GeneratedJavaFile>();
    generatedFiles.addAll(generateJavaFilesMybatis());
    generatedFiles.addAll(generateJavaFilesIbatis());
    return generatedFiles;
}
项目:cascade    文件:SmallXmlTest.java   
@Parameters(name = "{index}: {0}")
public static Collection<Object[]> parameters() {
    return Arrays.asList(new Object[][] {
        { "*", contains(0) },
        { "_ _", contains() },
        { "_ > _", contains() },
        { "_ ~ _", contains() },
        { "_ + _", contains() },
    });
}
项目:ditb    文件:TestCacheOnWrite.java   
@Parameters
public static Collection<Object[]> getParameters() throws IOException {
  List<Object[]> params = new ArrayList<Object[]>();
  for (BlockCache blockCache : getBlockCaches()) {
    for (CacheOnWriteType cowType : CacheOnWriteType.values()) {
      for (Compression.Algorithm compress : HBaseTestingUtility.COMPRESSION_ALGORITHMS) {
        for (boolean cacheCompressedData : new boolean[] { false, true }) {
          params.add(new Object[] { cowType, compress, cacheCompressedData, blockCache });
        }
      }
    }
  }
  return params;
}
项目:cf-mta-deploy-service    文件:ApplicationStagingStateGetterTest.java   
@Parameters
    public static Iterable<Object[]> getParameters() {
        return Arrays.asList(new Object[][] {
// @formatter:off
            {
                "apps-response-with-package-state.json", ApplicationStagingState.STAGED,
            },
            {
                "apps-response-without-package-state.json", null
            },
// @formatter:on
        });
    }
项目:r8    文件:FileNamePrefixTest.java   
@Parameters(name = "{index}: {1}")
public static Collection<Object[]> data() {
  return ImmutableList.of(
      new Object[]{new String[]{"classes.dex", "classes2.dex"}, "classes"},
      new Object[]{new String[]{"Classes.dex", "Classes2.dex"}, "Classes"},
      new Object[]{new String[]{"classes.dex", "classes2.dix"}, null},
      new Object[]{new String[]{"classes.dex", "classes2.xdex"}, null},
      new Object[]{new String[]{"classes.dex", "classes1.dex"}, null},
      new Object[]{new String[]{"classes.dex", "fields2.dex"}, null},
      new Object[]{new String[]{"classes.dex", "classes2.dex", "classes4.dex"}, null}
  );
}