Search in sources :

Example 1 with AndroidModelFeatures

use of com.android.tools.idea.gradle.project.model.AndroidModelFeatures in project android by JetBrains.

the class LayoutRenderingIssueValidationStrategyTest method mockAndroidModel.

@NotNull
private static AndroidModuleModel mockAndroidModel(@NotNull GradleVersion version, boolean hasLayoutRenderingIssue) {
    AndroidModelFeatures features = mock(AndroidModelFeatures.class);
    when(features.isLayoutRenderingIssuePresent()).thenReturn(hasLayoutRenderingIssue);
    AndroidModuleModel androidModel = mock(AndroidModuleModel.class);
    when(androidModel.getFeatures()).thenReturn(features);
    when(androidModel.getModelVersion()).thenReturn(version);
    return androidModel;
}
Also used : AndroidModelFeatures(com.android.tools.idea.gradle.project.model.AndroidModelFeatures) AndroidModuleModel(com.android.tools.idea.gradle.project.model.AndroidModuleModel) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

AndroidModelFeatures (com.android.tools.idea.gradle.project.model.AndroidModelFeatures)1 AndroidModuleModel (com.android.tools.idea.gradle.project.model.AndroidModuleModel)1 NotNull (org.jetbrains.annotations.NotNull)1