当前位置: 首页>>代码示例>>Java>>正文


Java ParameterizedRobolectricTestRunner类代码示例

本文整理汇总了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;
}
 
开发者ID:seven332,项目名称:Stage,代码行数:26,代码来源:StagePushTest.java

示例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},
        }
    );
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:23,代码来源:KeyCodeParameterizedTest.java

示例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},
      });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:ImageRequestBuilderCacheEnabledTest.java

示例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;
}
 
开发者ID:seven332,项目名称:Stage,代码行数:31,代码来源:StageReplaceTopTest.java

示例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;
}
 
开发者ID:seven332,项目名称:Stage,代码行数:31,代码来源:StageSetRootSceneTest.java

示例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;
}
 
开发者ID:seven332,项目名称:Stage,代码行数:29,代码来源:StagePopTest.java

示例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")}

  });
}
 
开发者ID:rakutentech,项目名称:android-perftracking,代码行数:29,代码来源:MeasurementSpec.java

示例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\""}
  });
}
 
开发者ID:rakutentech,项目名称:android-perftracking,代码行数:10,代码来源:MetricSpec.java

示例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())}
    });
}
 
开发者ID:roshakorost,项目名称:Phial,代码行数:11,代码来源:StoreParameterizedTest.java

示例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}
    });
}
 
开发者ID:openid,项目名称:AppAuth-Android,代码行数:12,代码来源:RegistrationResponseTest.java

示例11: data

import org.robolectric.ParameterizedRobolectricTestRunner; //导入依赖的package包/类
@ParameterizedRobolectricTestRunner.Parameters(name = "publish = {0}")
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][] {
        {false},
        {true}
    });
}
 
开发者ID:hijamoya,项目名称:RxLogin,代码行数:8,代码来源:RxLoginTest.java

示例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;
}
 
开发者ID:konmik,项目名称:satellite,代码行数:9,代码来源:RestartableSetTest.java

示例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 }
    });
}
 
开发者ID:lyft,项目名称:scissors,代码行数:9,代码来源:TargetSizeTest.java

示例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"}
    });
}
 
开发者ID:the-blue-alliance,项目名称:the-blue-alliance-android,代码行数:9,代码来源:MediaRendererTest.java

示例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"}
    });
}
 
开发者ID:the-blue-alliance,项目名称:the-blue-alliance-android,代码行数:10,代码来源:MatchRendererTest.java


注:本文中的org.robolectric.ParameterizedRobolectricTestRunner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。