本文整理汇总了Java中org.robolectric.ParameterizedRobolectricTestRunner类的典型用法代码示例。如果您正苦于以下问题:Java ParameterizedRobolectricTestRunner类的具体用法?Java ParameterizedRobolectricTestRunner怎么用?Java ParameterizedRobolectricTestRunner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ParameterizedRobolectricTestRunner类属于org.robolectric包,在下文中一共展示了ParameterizedRobolectricTestRunner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{index}-push-{4}")
public static List<Object[]> data() {
List<Object[]> parameters = new LinkedList<>();
boolean[] starteds = new boolean[] {false, true, true};
boolean[] resumeds = new boolean[] {false, false, true};
boolean[] retainViews = new boolean[] {false, true};
for (int i = 0; i < 3; ++i) {
boolean started = starteds[i];
boolean resumed = resumeds[i];
for (boolean retainView : retainViews) {
for (List<Integer> opacities : new HomogeniousPermutator<>(Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE), SCENE_COUNT)) {
parameters.add(new Object[] {
started,
resumed,
retainView,
toArray(opacities),
getName(started, resumed, retainView, opacities)
});
}
}
}
return parameters;
}
示例2: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(
new Object[][] {
{0},
{1},
{2},
{3},
{4},
{5},
{6},
{7},
{8},
{9},
{10},
{11},
{12},
{13},
{14},
}
);
}
示例3: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "URI of scheme \"{0}://\"")
public static Collection<Object[]> data() {
return Arrays.asList(
new Object[][]{
{"asset", false},
{"content", false},
{"data", false},
{"file", false},
{"http", true},
{"https", true},
{"res", false},
});
}
示例4: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{index}-replaceTop-{5}")
public static List<Object[]> data() {
List<Object[]> parameters = new LinkedList<>();
boolean[] starteds = new boolean[] {false, true, true};
boolean[] resumeds = new boolean[] {false, false, true};
boolean[] retainViews = new boolean[] {false, true};
for (int i = 0; i < 3; ++i) {
boolean started = starteds[i];
boolean resumed = resumeds[i];
for (boolean retainView : retainViews) {
for (int j = 0; j <= SCENE_COUNT; ++j) {
for (List<Integer> opacities : new HomogeniousPermutator<>(
Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE), j)) {
for (int opacity : Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE)) {
parameters.add(new Object[] {
started,
resumed,
retainView,
toArray(opacities),
opacity,
getName(started, resumed, retainView, opacities, opacity)
});
}
}
}
}
}
return parameters;
}
示例5: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{index}-setRoot-{5}")
public static List<Object[]> data() {
List<Object[]> parameters = new LinkedList<>();
boolean[] starteds = new boolean[] {false, true, true};
boolean[] resumeds = new boolean[] {false, false, true};
boolean[] retainViews = new boolean[] {false, true};
for (int i = 0; i < 3; ++i) {
boolean started = starteds[i];
boolean resumed = resumeds[i];
for (boolean retainView : retainViews) {
for (int j = 0; j <= SCENE_COUNT; ++j) {
for (List<Integer> opacities : new HomogeniousPermutator<>(
Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE), j)) {
for (int opacity : Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE)) {
parameters.add(new Object[] {
started,
resumed,
retainView,
toArray(opacities),
opacity,
getName(started, resumed, retainView, opacities, opacity)
});
}
}
}
}
}
return parameters;
}
示例6: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{index}-pop-{5}")
public static List<Object[]> data() {
List<Object[]> parameters = new LinkedList<>();
boolean[] starteds = new boolean[] {false, true, true};
boolean[] resumeds = new boolean[] {false, false, true};
boolean[] retainViews = new boolean[] {false, true};
for (int i = 0; i < 3; ++i) {
boolean started = starteds[i];
boolean resumed = resumeds[i];
for (boolean retainView : retainViews) {
for (List<Integer> opacities : new HomogeniousPermutator<>(Arrays.asList(Scene.TRANSPARENT, Scene.TRANSLUCENT, Scene.OPAQUE), SCENE_COUNT)) {
for (List<Integer> popOrder : new Permutator<>(toList(newIntArray(0, SCENE_COUNT)), SCENE_COUNT)) {
parameters.add(new Object[] {
started,
resumed,
retainView,
toArray(opacities),
toArray(popOrder),
getName(started, resumed, retainView, opacities, popOrder)
});
}
}
}
}
return parameters;
}
示例7: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "Action = {0}, Input = {1}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{Action.START, null},
{Action.START, ""},
{Action.START, "appQ\\"},
{Action.START, "appQ\""},
{Action.END, null},
{Action.END, ""},
{Action.END, "appQ\\"},
{Action.END, "appQ\""},
{Action.START_AGGREGATED, Pair.create(null, null)},
{Action.START_AGGREGATED, Pair.create("", null)},
{Action.START_AGGREGATED, Pair.create("valid", null)},
{Action.START_AGGREGATED, Pair.create("appQ\\", null)},
{Action.START_AGGREGATED, Pair.create("appQ\"", null)},
{Action.START_AGGREGATED, Pair.create("appQ\\", "Object")},
{Action.START_AGGREGATED, Pair.create("appQ\"", "Object")},
{Action.END_AGGREGATED, Pair.create(null, null)},
{Action.END_AGGREGATED, Pair.create("", null)},
{Action.END_AGGREGATED, Pair.create("valid", null)},
{Action.END_AGGREGATED, Pair.create("appQ\\", null)},
{Action.END_AGGREGATED, Pair.create("appQ\"", null)},
{Action.END_AGGREGATED, Pair.create("appQ\\", "Object")},
{Action.END_AGGREGATED, Pair.create("appQ\"", "Object")}
});
}
示例8: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "Input = {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{null},
{""},
{"appQ\\"},
{"appq\""}
});
}
示例9: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "Data to save and read = {0}")
public static Iterable<Object[]> data() {
return Arrays.asList(new Object[][]{
{Collections.emptyList()},
{Collections.singletonList("")},
{Collections.singletonList("val1")},
{Arrays.asList("val1", "val2", "val3")},
{IntStream.range(0, 101).mapToObj(String::valueOf).collect(Collectors.toList())}
});
}
示例10: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
/**
* TODO .
*/
@ParameterizedRobolectricTestRunner.Parameters(name = "Missing parameter = {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{RegistrationResponse.PARAM_CLIENT_SECRET_EXPIRES_AT},
{RegistrationResponse.PARAM_REGISTRATION_ACCESS_TOKEN},
{RegistrationResponse.PARAM_REGISTRATION_CLIENT_URI}
});
}
示例11: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "publish = {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {
{false},
{true}
});
}
示例12: parameters
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{0} {1}")
public static Collection<Object[]> parameters() {
ArrayList<Object[]> variants = new ArrayList<>();
for (int restartable = 0; restartable < 4; restartable++)
for (int method = 0; method < 4; method++)
variants.add(new Object[]{restartable, method});
return variants;
}
示例13: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "{2} viewport = [{0}x{1}]")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {
{ 100, 100, SQUARED },
{ 100, 56, LANDSCAPE },
{ 56, 100, PORTRAIT }
});
}
示例14: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "MediaType = {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"media_cdphotothread", "cdphotothread"},
{"media_youtube", "youtube"},
{"media_imgur", "imgur"}
});
}
示例15: data
import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "MatchKey = {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"2015necmp_qm1"},
{"2015necmp_qf1m1"},
{"2015necmp_sf1m1"},
{"2015necmp_f1m1"}
});
}