use of com.android.builder.model.Variant in project android by JetBrains.
the class AndroidModuleModelTest method testGetSelectedVariant.
public void testGetSelectedVariant() throws Exception {
Variant selectedVariant = myAndroidModel.getSelectedVariant();
assertNotNull(selectedVariant);
assertSame(myAndroidProject.getFirstVariant(), selectedVariant);
}
use of com.android.builder.model.Variant in project android by JetBrains.
the class VariantSelectorTest method findVariantToSelectWithDebugVariant.
@Test
public void findVariantToSelectWithDebugVariant() {
Variant debugVariant = mock(Variant.class);
Variant releaseVariant = mock(Variant.class);
when(myAndroidProject.getVariants()).thenReturn(Lists.newArrayList(debugVariant, releaseVariant));
when(debugVariant.getName()).thenReturn("debug");
when(releaseVariant.getName()).thenReturn("release");
Variant variant = myVariantSelector.findVariantToSelect(myAndroidProject);
assertSame(debugVariant, variant);
}
use of com.android.builder.model.Variant in project android by JetBrains.
the class VariantSelectorTest method getVariantToSelectWithoutVariants.
@Test
public void getVariantToSelectWithoutVariants() {
when(myAndroidProject.getVariants()).thenReturn(Collections.emptyList());
Variant variant = myVariantSelector.findVariantToSelect(myAndroidProject);
assertNull(variant);
}
Aggregations