org.robolectric.ParameterizedRobolectricTestRunner.Parameters Java Examples

The following examples show how to use org.robolectric.ParameterizedRobolectricTestRunner.Parameters. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressIndicatorConfigTest.java    From material-components-android with Apache License 2.0 5 votes vote down vote up
@Parameters(name = "indicatorType={0},isIndeterminate={1},drawableType={2}")
public static ImmutableList<Object[]> data() {
  return ImmutableList.of(
      new Object[] {ProgressIndicator.LINEAR, true, IndeterminateDrawable.class},
      new Object[] {ProgressIndicator.LINEAR, false, DeterminateDrawable.class},
      new Object[] {ProgressIndicator.CIRCULAR, true, IndeterminateDrawable.class},
      new Object[] {ProgressIndicator.CIRCULAR, false, DeterminateDrawable.class});
}
 
Example #2
Source File: SliderConfigTest.java    From material-components-android with Apache License 2.0 4 votes vote down vote up
@Parameters(name = "valueFrom={0},valueTo={1},stepValue={2},value={3},expectedException={4}")
public static Iterable<Object[]> data() {
  return ImmutableList.of(
      new Object[] {
        /* valueFrom = */ 0f, /* valueTo = */ 1f, /* stepValue = */ .2f, /* value = */ 0f, null,
      },
      new Object[] {
        /* valueFrom = */ 1.2f,
        /* valueTo = */ 2.5f,
        /* stepValue = */ 0.01f,
        /* value = */ 1.2f,
        null,
      },
      new Object[] {
        /* valueFrom = */ 1.235f,
        /* valueTo = */ 2.555f,
        /* stepValue = */ 0.04f,
        /* value = */ 1.235f,
        null,
      },
      new Object[] {
        /* valueFrom = */ 1.235f,
        /* valueTo = */ 2.555f,
        /* stepValue = */ 0.039f,
        /* value = */ 1.235f,
        IllegalStateException.class,
      },
      new Object[] {
        /* valueFrom = */ 10f,
        /* valueTo = */ 3f,
        /* stepValue = */ 2f,
        /* value = */ 10f,
        IllegalStateException.class,
      },
      new Object[] {
        /* valueFrom = */ 0f, /* valueTo = */ 1f, /* stepValue = */ 0, /* value = */ 0f, null,
      },
      new Object[] {
        /* valueFrom = */ 10f,
        /* valueTo = */ 3f,
        /* stepValue = */ 2f,
        /* value = */ 10f,
        IllegalStateException.class,
      },
      new Object[] {
        /* valueFrom = */ 0f,
        /* valueTo = */ 5f,
        /* stepValue = */ 10f,
        /* value = */ 0f,
        IllegalStateException.class,
      },
      new Object[] {
        /* valueFrom = */ 0f, /* valueTo = */ 10f, /* stepValue = */ 10f, /* value = */ 0f, null,
      },
      new Object[] {
        /* valueFrom = */ 0f,
        /* valueTo = */ 10f,
        /* stepValue = */ 10f,
        /* value = */ 21f,
        IllegalStateException.class,
      });
}
 
Example #3
Source File: UriUtilTest.java    From fresco with MIT License 4 votes vote down vote up
@Parameters
public static Collection<Object[]> data() {
  return Arrays.asList(
      new Object[] {"http"}, new Object[] {"https"}, new Object[] {"ftp"}, new Object[] {"file"});
}