org.robolectric.RobolectricTestRunner Java Examples

The following examples show how to use org.robolectric.RobolectricTestRunner. 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: SceneConfigProvider.java    From scene with Apache License 2.0 5 votes vote down vote up
@Override
    public Config get() {
        RobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider provider = new RobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider();
//        return new Config.Builder(provider.get()).setSdk(Build.VERSION_CODES.KITKAT).build();
//        return new Config.Builder(provider.get()).setSdk(Build.VERSION_CODES.P).build();
//        return new Config.Builder(provider.get()).setMinSdk(Build.VERSION_CODES.JELLY_BEAN).setMaxSdk(Build.VERSION_CODES.P).build();
        return new Config.Builder(provider.get()).setSdk(
                Build.VERSION_CODES.JELLY_BEAN,
                Build.VERSION_CODES.JELLY_BEAN_MR1,
                Build.VERSION_CODES.JELLY_BEAN_MR2,
                Build.VERSION_CODES.KITKAT).build();

    }
 
Example #2
Source File: SceneConfigProvider.java    From scene with Apache License 2.0 5 votes vote down vote up
@Override
    public Config get() {
        RobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider provider = new RobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider();
//        return new Config.Builder(provider.get()).setSdk(Build.VERSION_CODES.KITKAT).build();
//        return new Config.Builder(provider.get()).setSdk(Build.VERSION_CODES.P).build();
//        return new Config.Builder(provider.get()).setMinSdk(Build.VERSION_CODES.JELLY_BEAN).setMaxSdk(Build.VERSION_CODES.P).build();
        return new Config.Builder(provider.get()).setSdk(
                Build.VERSION_CODES.JELLY_BEAN,
                Build.VERSION_CODES.JELLY_BEAN_MR1,
                Build.VERSION_CODES.JELLY_BEAN_MR2,
                Build.VERSION_CODES.KITKAT).build();

    }