Search in sources :

Example 1 with Parameters

use of org.robolectric.ParameterizedRobolectricTestRunner.Parameters in project capacitor-radar by radarlabs.

the class PermissionsTest method data.

@Parameters(name = "{index}: " + "gpsLocationPermission? {0}. " + "wifiLocationPermission? {1}. " + "backgroundLocationPermission? {2}")
public static Iterable<Object[]> data() {
    PermissionState[] states = PermissionState.values();
    Object[][] data = new Object[states.length * states.length * states.length][3];
    int i = 0;
    for (PermissionState gpsLocationPermission : states) {
        for (PermissionState wifiLocationPermission : states) {
            for (PermissionState backgroundLocationPermission : states) {
                data[i] = new Object[] { gpsLocationPermission, wifiLocationPermission, backgroundLocationPermission };
                i++;
            }
        }
    }
    return Arrays.asList(data);
}
Also used : PermissionState(com.getcapacitor.PermissionState) JSObject(com.getcapacitor.JSObject) Parameters(org.robolectric.ParameterizedRobolectricTestRunner.Parameters)

Aggregations

JSObject (com.getcapacitor.JSObject)1 PermissionState (com.getcapacitor.PermissionState)1 Parameters (org.robolectric.ParameterizedRobolectricTestRunner.Parameters)1