use of org.junit.runners.Parameterized.Parameters in project voldemort by voldemort.
the class VoldemortNativeSocketStoreTest method configs.
@Parameters
public static Collection<Object[]> configs() {
RequestFormatType[] types = new RequestFormatType[] { RequestFormatType.VOLDEMORT_V1, RequestFormatType.VOLDEMORT_V2, RequestFormatType.VOLDEMORT_V3 };
List<Object[]> options = new ArrayList<Object[]>();
boolean[] nioOptions = { true, false };
for (RequestFormatType type : types) {
for (boolean nio : nioOptions) {
options.add(new Object[] { type, nio });
}
}
return options;
}
use of org.junit.runners.Parameterized.Parameters in project spring-framework by spring-projects.
the class CronTriggerTests method getParameters.
@Parameters(name = "date [{0}], time zone [{1}]")
public static List<Object[]> getParameters() {
List<Object[]> list = new ArrayList<>();
list.add(new Object[] { new Date(), TimeZone.getTimeZone("PST") });
list.add(new Object[] { new Date(), TimeZone.getTimeZone("CET") });
return list;
}
use of org.junit.runners.Parameterized.Parameters in project spring-framework by spring-projects.
the class AbstractWebSocketIntegrationTests method arguments.
@Parameters(name = "client[{0}] - server [{1}]")
public static Object[][] arguments() throws IOException {
Flux<? extends WebSocketClient> clients = Flux.concat(Flux.just(new StandardWebSocketClient()).repeat(5), Flux.just(new JettyWebSocketClient()).repeat(5), Flux.just(new ReactorNettyWebSocketClient()).repeat(5), Flux.just(new RxNettyWebSocketClient()).repeat(5), Flux.just(new UndertowWebSocketClient(Xnio.getInstance().createWorker(OptionMap.EMPTY))).repeat(5));
Flux<? extends HttpServer> servers = Flux.just(new TomcatHttpServer(TMP_DIR.getAbsolutePath(), WsContextListener.class), new JettyHttpServer(), new ReactorHttpServer(), new RxNettyHttpServer(), new UndertowHttpServer()).repeat(5);
Flux<? extends Class<?>> configs = Flux.just(TomcatConfig.class, JettyConfig.class, ReactorNettyConfig.class, RxNettyConfig.class, UndertowConfig.class).repeat(5);
return Flux.zip(clients, servers, configs).map(Tuple3::toArray).collectList().block().toArray(new Object[25][2]);
}
use of org.junit.runners.Parameterized.Parameters in project Bukkit by Bukkit.
the class LocationTest method data.
@Parameters(name = "{index}: {0}")
public static List<Object[]> data() {
// Test is deterministic
Random RANDOM = new Random(1l);
int r = 0;
return ImmutableList.<Object[]>of(new Object[] { "X", 1, 0, 0, 270, 0 }, new Object[] { "-X", -1, 0, 0, 90, 0 }, new Object[] { "Z", 0, 0, 1, 0, 0 }, new Object[] { "-Z", 0, 0, -1, 180, 0 }, new Object[] { "Y", 0, 1, 0, // Zero is here as a "default" value
0, // Zero is here as a "default" value
-90 }, new Object[] { "-Y", 0, -1, 0, // Zero is here as a "default" value
0, // Zero is here as a "default" value
90 }, new Object[] { "X Z", HALF_UNIT, 0, HALF_UNIT, (270 + 360) / 2, 0 }, new Object[] { "X -Z", HALF_UNIT, 0, -HALF_UNIT, (270 + 180) / 2, 0 }, new Object[] { "-X -Z", -HALF_UNIT, 0, -HALF_UNIT, (90 + 180) / 2, 0 }, new Object[] { "-X Z", -HALF_UNIT, 0, HALF_UNIT, (90 + 0) / 2, 0 }, new Object[] { "X Y Z", HALF_HALF_UNIT, HALF_UNIT, HALF_HALF_UNIT, (270 + 360) / 2, -45 }, new Object[] { "-X -Y -Z", -HALF_HALF_UNIT, -HALF_UNIT, -HALF_HALF_UNIT, (90 + 180) / 2, 45 }, getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++), getRandom(RANDOM, r++));
}
use of org.junit.runners.Parameterized.Parameters in project hadoop by apache.
the class TestSaslRPC method data.
@Parameters
public static Collection<Object[]> data() {
Collection<Object[]> params = new ArrayList<>();
for (QualityOfProtection qop : QualityOfProtection.values()) {
params.add(new Object[] { new QualityOfProtection[] { qop }, qop, null });
}
params.add(new Object[] { new QualityOfProtection[] { QualityOfProtection.PRIVACY, QualityOfProtection.AUTHENTICATION }, QualityOfProtection.PRIVACY, null });
params.add(new Object[] { new QualityOfProtection[] { QualityOfProtection.PRIVACY, QualityOfProtection.AUTHENTICATION }, QualityOfProtection.AUTHENTICATION, "org.apache.hadoop.ipc.TestSaslRPC$AuthSaslPropertiesResolver" });
return params;
}
Aggregations