Java 类org.robolectric.ParameterizedRobolectricTestRunner 实例源码

项目:Stage    文件:StagePushTest.java   
@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;
}
项目:Connect-SDK-Cordova-Plugin    文件:KeyCodeParameterizedTest.java   
@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},
        }
    );
}
项目:Connect-SDK-Android-Core    文件:KeyCodeParameterizedTest.java   
@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},
        }
    );
}
项目:GitHub    文件:ImageRequestBuilderCacheEnabledTest.java   
@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},
      });
}
项目:Stage    文件:StageReplaceTopTest.java   
@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;
}
项目:Stage    文件:StageSetRootSceneTest.java   
@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;
}
项目:Stage    文件:StagePopTest.java   
@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;
}
项目:android-perftracking    文件:MeasurementSpec.java   
@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")}

  });
}
项目:android-perftracking    文件:MetricSpec.java   
@ParameterizedRobolectricTestRunner.Parameters(name = "Input = {0}")
public static Collection<Object[]> data() {
  return Arrays.asList(new Object[][]{
      {null},
      {""},
      {"appQ\\"},
      {"appq\""}
  });
}
项目:Phial    文件:StoreParameterizedTest.java   
@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())}
    });
}
项目:AppAuth-Android    文件:RegistrationResponseTest.java   
/**
 * 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}
    });
}
项目:RxLogin    文件:RxLoginTest.java   
@ParameterizedRobolectricTestRunner.Parameters(name = "publish = {0}")
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][] {
        {false},
        {true}
    });
}
项目:satellite    文件:RestartableSetTest.java   
@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;
}
项目:fresco    文件:ImageRequestBuilderCacheEnabledTest.java   
@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},
      });
}
项目:scissors    文件:TargetSizeTest.java   
@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 }
    });
}
项目:the-blue-alliance-android    文件:MediaRendererTest.java   
@ParameterizedRobolectricTestRunner.Parameters(name = "MediaType = {0}")
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][]{
            {"media_cdphotothread", "cdphotothread"},
            {"media_youtube", "youtube"},
            {"media_imgur", "imgur"}
    });
}
项目:the-blue-alliance-android    文件:MatchRendererTest.java   
@ParameterizedRobolectricTestRunner.Parameters(name = "MatchKey = {0}")
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][]{
      {"2015necmp_qm1"},
      {"2015necmp_qf1m1"},
      {"2015necmp_sf1m1"},
      {"2015necmp_f1m1"}
    });
}
项目:ttorrent-android-service    文件:TtorrentDownloaderTest.java   
@ParameterizedRobolectricTestRunner.Parameters(name = "run {index}/"+(RUN_COUNT-1))
public static Collection data() {
    return Arrays.asList(new Object[RUN_COUNT][]);
}
项目:so    文件:MainActivityTest.java   
@ParameterizedRobolectricTestRunner.Parameters
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][]{
            {new RectF(1f, 1f, 1f, 1f)}
    });
}
项目:Connect-SDK-Android-FireTV    文件:PlayStateSubscriptionParameterizedTest.java   
@ParameterizedRobolectricTestRunner.Parameters
public static Collection<Object[]> data() {
    return Arrays.asList(new Object[][] {
        {0},{1},{2},{3},{4},{5},{6},{7},
    });
}