本文整理了Java中org.robolectric.annotation.Config.qualifiers()
方法的一些代码示例,展示了Config.qualifiers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.qualifiers()
方法的具体详情如下:
包路径:org.robolectric.annotation.Config
类名称:Config
方法名:qualifiers
暂无
代码示例来源:origin: robolectric/robolectric
String qualifiersOverlayValue = overlayConfig.qualifiers();
if (qualifiersOverlayValue != null && !qualifiersOverlayValue.equals("")) {
if (qualifiersOverlayValue.startsWith("+")) {
代码示例来源:origin: robolectric/robolectric
public Builder(Config config) {
sdk = config.sdk();
minSdk = config.minSdk();
maxSdk = config.maxSdk();
manifest = config.manifest();
qualifiers = config.qualifiers();
packageName = config.packageName();
resourceDir = config.resourceDir();
assetDir = config.assetDir();
shadows = config.shadows();
instrumentedPackages = config.instrumentedPackages();
application = config.application();
libraries = config.libraries();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldAppendQualifiersStartingWithPlus() throws Exception {
Config config = new Config.Builder().setQualifiers("w100dp").build();
config = overlay(config, new Config.Builder().setQualifiers("w101dp").build());
assertThat(config.qualifiers()).isEqualTo("w101dp");
config = overlay(config, new Config.Builder().setQualifiers("+w102dp").build());
config = overlay(config, new Config.Builder().setQualifiers("+w103dp").build());
assertThat(config.qualifiers()).isEqualTo("w101dp +w102dp +w103dp");
config = overlay(config, new Config.Builder().setQualifiers("+w104dp").build());
config = overlay(config, new Config.Builder().setQualifiers("w105dp").build());
assertThat(config.qualifiers()).isEqualTo("w105dp");
}
代码示例来源:origin: robolectric/robolectric
private static void assertConfig(
Config config,
int[] sdk,
String manifest,
Class<? extends Application> application,
String packageName,
String qualifiers,
String resourceDir,
String assetsDir,
Class<?>[] shadows,
String[] instrumentedPackages,
String[] libraries) {
assertThat(config.sdk()).isEqualTo(sdk);
assertThat(config.manifest()).isEqualTo(manifest);
assertThat(config.application()).isEqualTo(application);
assertThat(config.packageName()).isEqualTo(packageName);
assertThat(config.qualifiers()).isEqualTo(qualifiers);
assertThat(config.resourceDir()).isEqualTo(resourceDir);
assertThat(config.assetDir()).isEqualTo(assetsDir);
assertThat(config.shadows()).asList().containsAllIn(shadows).inOrder();
assertThat(config.instrumentedPackages()).asList().containsAllIn(instrumentedPackages);
assertThat(config.libraries()).asList().containsAllIn(libraries);
}
代码示例来源:origin: robolectric/robolectric
DisplayMetrics displayMetrics = new DisplayMetrics();
Bootstrap.applyQualifiers(config.qualifiers(), apiLevel, androidConfiguration,
displayMetrics);
代码示例来源:origin: org.robolectric/robolectric
DisplayMetrics displayMetrics = new DisplayMetrics();
Bootstrap.applyQualifiers(config.qualifiers(), sdkConfig.getApiLevel(), configuration,
displayMetrics);
代码示例来源:origin: org.robolectric/annotations
String qualifiersOverlayValue = overlayConfig.qualifiers();
if (qualifiersOverlayValue != null && !qualifiersOverlayValue.equals("")) {
if (qualifiersOverlayValue.startsWith("+")) {
代码示例来源:origin: robospock/RoboSpock
String qualifiers = addVersionQualifierToQualifiers(config.qualifiers());
Resources systemResources = Resources.getSystem();
Configuration configuration = systemResources.getConfiguration();
代码示例来源:origin: org.robolectric/annotations
public Builder(Config config) {
sdk = config.sdk();
minSdk = config.minSdk();
maxSdk = config.maxSdk();
manifest = config.manifest();
qualifiers = config.qualifiers();
packageName = config.packageName();
resourceDir = config.resourceDir();
assetDir = config.assetDir();
shadows = config.shadows();
instrumentedPackages = config.instrumentedPackages();
application = config.application();
libraries = config.libraries();
}
代码示例来源:origin: ImangazalievM/ReActiveAndroid
@Override
public Config getConfig(@NonNull Method method) {
final Config defaultConfig = super.getConfig(method);
return new Config.Implementation(
new int[]{SDK_EMULATE_LEVEL},
defaultConfig.manifest(),
defaultConfig.qualifiers(),
defaultConfig.packageName(),
defaultConfig.abiSplit(),
defaultConfig.resourceDir(),
defaultConfig.assetDir(),
defaultConfig.buildDir(),
defaultConfig.shadows(),
defaultConfig.instrumentedPackages(),
TestApp.class, // Notice that we override real application class for Unit tests.
defaultConfig.libraries(),
defaultConfig.constants() == Void.class ? BuildConfig.class : defaultConfig.constants()
);
}
代码示例来源:origin: ImangazalievM/Bubbble
@Override
public Config getConfig(@NonNull Method method) {
final Config defaultConfig = super.getConfig(method);
return new Config.Implementation(
new int[]{SDK_EMULATE_LEVEL},
defaultConfig.manifest(),
defaultConfig.qualifiers(),
defaultConfig.packageName(),
defaultConfig.abiSplit(),
defaultConfig.resourceDir(),
defaultConfig.assetDir(),
defaultConfig.buildDir(),
defaultConfig.shadows(),
defaultConfig.instrumentedPackages(),
BubbbleTestApplication.class, // Notice that we override real application class for Unit tests.
defaultConfig.libraries(),
defaultConfig.constants() == Void.class ? BuildConfig.class : defaultConfig.constants()
);
}
内容来源于网络,如有侵权,请联系作者删除!