本文整理了Java中org.junit.runners.Parameterized.<init>()
方法的一些代码示例,展示了Parameterized.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parameterized.<init>()
方法的具体详情如下:
包路径:org.junit.runners.Parameterized
类名称:Parameterized
方法名:<init>
[英]Only called reflectively. Do not use programmatically.
[中]只是若有所思地打电话。不要以编程方式使用。
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "multiThreadedIndexPopulationEnabled = {0}" )
public static Object[] multiThreadedIndexPopulationEnabledValues()
{
return new Object[]{true, false};
}
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "{0}" )
public static List<Class<? extends TransportConnection>> transports()
{
return asList( SocketConnection.class, WebSocketConnection.class, SecureSocketConnection.class, SecureWebSocketConnection.class );
}
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "{1}" )
public static List<Object[]> parameters()
{
return Arrays.asList( new Object[]{UNBOUNDED_QUEUE, "Unbounded Queue"}, new Object[]{SYNCHRONOUS_QUEUE, "Synchronous Queue"},
new Object[]{TEST_BOUNDED_QUEUE_SIZE, "Bounded Queue"} );
}
代码示例来源:origin: googlesamples/android-testing
/**
* @return {@link Iterable} that contains the values that should be passed to the constructor.
* In this example we are going to use three parameters: operand one, operand two and the
* expected result.
*/
@Parameters
public static Iterable<Object[]> data() {
return Arrays.asList(new Object[][]{
{0, 0, 0},
{0, -1, -1},
{2, 2, 4},
{8, 8, 16},
{16, 16, 32},
{32, 0, 32},
{64, 64, 128}});
}
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "{0}" )
public static List<CollectionsFactorySupplier> data()
{
return asList( new CollectionsFactorySupplier()
{
@Override
public CollectionsFactory create()
{
return CollectionsFactorySupplier.ON_HEAP.create();
}
@Override
public String toString()
{
return "On heap";
}
}, new CollectionsFactorySupplier()
{
@Override
public CollectionsFactory create()
{
return new OffHeapCollectionsFactory( BLOCK_ALLOCATOR );
}
@Override
public String toString()
{
return "Off heap";
}
} );
}
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "{2}" )
public static List<Object[]> parameters()
{
List<Object[]> result = new ArrayList<>();
for ( Class<? extends TransportConnection> connectionClass : CONNECTION_CLASSES )
{
for ( Neo4jPack neo4jPack : NEO4J_PACK_VERSIONS )
{
result.add( new Object[]{connectionClass, neo4jPack, newName( connectionClass, neo4jPack )} );
}
}
return result;
}
代码示例来源:origin: elastic/elasticsearch-hadoop
@Parameters
public static Collection<Object[]> getParameters() {
List<Object[]> parameters = new ArrayList<Object[]>();
parameters.add(new Object[]{false, "typed"});
parameters.add(new Object[]{true, "typeless"});
return parameters;
}
代码示例来源:origin: h2oai/h2o-3
@Parameters
public static PCAImplementation[] parametersForSvdImplementation() {
return hex.pca.PCAImplementation.values();
}
代码示例来源:origin: neo4j/neo4j
new Neo4jPackV2() );
@Parameter( 0 )
public Class<? extends TransportConnection> connectionClass;
@Parameter( 1 )
public Neo4jPack neo4jPack;
@Parameter( 2 )
public String name;
代码示例来源:origin: json-path/JsonPath
@Parameters
public static Iterable<Configuration> configurations() {
return Configurations.configurations();
}
代码示例来源:origin: web3j/web3j
/**
* Loads the test vectors into a in-memory list and feed them one after another to
* our parameterized tests.
*
* @return Collection of test vectors in which each vector is an array containing
* initial entropy, expected mnemonic and expected seed.
* @throws IOException Shouldn't happen!
*/
@Parameters
public static Collection<Object[]> data() throws IOException {
String data = Files.lines(Paths.get(SAMPLE_FILE)).collect(Collectors.joining("\n"));
String[] each = data.split("###");
List<Object[]> parameters = new ArrayList<>();
for (String part : each) {
parameters.add(part.trim().split("\n"));
}
return parameters;
}
代码示例来源:origin: neo4j/neo4j
@Parameters( name = "{0}" )
public static List<Neo4jPack> parameters()
{
return Arrays.asList( new Neo4jPackV1(), new Neo4jPackV2() );
}
代码示例来源:origin: neo4j/neo4j
private ExecutorService executorService;
@Parameter( 0 )
public int queueSize;
@Parameter( 1 )
public String name;
代码示例来源:origin: neo4j/neo4j
@Parameter
public Neo4jPack neo4jPack;
代码示例来源:origin: h2oai/h2o-3
@Parameter
public PCAImplementation PCAImplementation;
代码示例来源:origin: googleapis/google-cloud-java
@Parameter(value = 0)
public Type type;
@Parameter(value = 1)
public String implMethodName;
@Parameter(value = 2)
public Object value;
@Parameter(value = 3)
public String getterMethodName;
@Parameter(value = 4)
@Nullable
public List<String> otherAllowedGetters;
代码示例来源:origin: neo4j/neo4j
private TxState state;
@Parameter
public CollectionsFactorySupplier collectionsFactorySupplier;
代码示例来源:origin: neo4j/neo4j
private static final String NAME_PROPERTY = "name";
@Parameter
public boolean multiThreadedPopulationEnabled;
代码示例来源:origin: mulesoft/mule
@Parameters(name = "isSimpleType({0})")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {{BUILDER.stringType().build(), true}, {BUILDER.numberType().build(), true},
{BUILDER.booleanType().build(), true}, {BUILDER.objectType().build(), false},
{BUILDER.arrayType().of(BUILDER.stringType()).build(), false}, {BUILDER.dateTimeType().build(), false}});
}
代码示例来源:origin: cloudant/sync-android
@Parameters(name = "{0}")
public static Iterable<Object[]> data() throws Exception {
return Arrays.asList(new Object[][]{ { SQL_ONLY_EXECUTION },
{ MATCHER_EXECUTION },
{ STANDARD_EXECUTION } });
}
内容来源于网络,如有侵权,请联系作者删除!