Search in sources :

Example 1 with SdkCollection

use of org.robolectric.plugins.SdkCollection in project robolectric by robolectric.

the class RobolectricTestRunnerMultiApiTest method withEnabledSdks_createChildrenForEachSupportedSdk.

@Test
public void withEnabledSdks_createChildrenForEachSupportedSdk() throws Throwable {
    delegateSdkPicker = new DefaultSdkPicker(new SdkCollection(() -> map(16, 17)), null);
    runner = runnerOf(TestWithNoConfig.class);
    assertThat(runner.getChildren()).hasSize(2);
}
Also used : SdkCollection(org.robolectric.plugins.SdkCollection) DefaultSdkPicker(org.robolectric.plugins.DefaultSdkPicker) Test(org.junit.Test)

Example 2 with SdkCollection

use of org.robolectric.plugins.SdkCollection in project robolectric by robolectric.

the class RobolectricTestRunnerMultiApiTest method setUp.

@Before
public void setUp() {
    numSupportedApis = APIS_FOR_TEST.length;
    runListener = new MyRunListener();
    runNotifier = new RunNotifier();
    runNotifier.addListener(runListener);
    sdkCollection = new SdkCollection(() -> map(APIS_FOR_TEST));
    delegateSdkPicker = new DefaultSdkPicker(sdkCollection, null);
    priorResourcesMode = System.getProperty("robolectric.resourcesMode");
    System.setProperty("robolectric.resourcesMode", "legacy");
    priorAlwaysInclude = System.getProperty("robolectric.alwaysIncludeVariantMarkersInTestName");
    System.clearProperty("robolectric.alwaysIncludeVariantMarkersInTestName");
}
Also used : RunNotifier(org.junit.runner.notification.RunNotifier) SdkCollection(org.robolectric.plugins.SdkCollection) DefaultSdkPicker(org.robolectric.plugins.DefaultSdkPicker) Before(org.junit.Before)

Aggregations

DefaultSdkPicker (org.robolectric.plugins.DefaultSdkPicker)2 SdkCollection (org.robolectric.plugins.SdkCollection)2 Before (org.junit.Before)1 Test (org.junit.Test)1 RunNotifier (org.junit.runner.notification.RunNotifier)1