use of com.android.tools.idea.gradle.project.ModuleToImport in project android by JetBrains.
the class ModulesListModelTest method testNameCollision.
public void testNameCollision() {
ModuleToImport anotherModule = new ModuleToImport("m1", myModule2.location, NO_DEPS);
setModules(myModule1, anotherModule);
myModel.setModuleName(myModule1, anotherModule.name);
assertEquals(DUPLICATE_MODULE_NAME, myModel.getModuleState(anotherModule));
assertEquals(DUPLICATE_MODULE_NAME, myModel.getModuleState(myModule1));
myModel.setSelected(anotherModule, false);
assertEquals(OK, myModel.getModuleState(anotherModule));
assertEquals(OK, myModel.getModuleState(myModule1));
myModel.setSelected(anotherModule, true);
assertEquals(DUPLICATE_MODULE_NAME, myModel.getModuleState(anotherModule));
assertEquals(DUPLICATE_MODULE_NAME, myModel.getModuleState(myModule1));
myModel.setSelected(myModule1, false);
assertEquals(OK, myModel.getModuleState(anotherModule));
assertEquals(OK, myModel.getModuleState(myModule1));
}
use of com.android.tools.idea.gradle.project.ModuleToImport in project android by JetBrains.
the class ModulesListModelTest method testModuleExistsSeverity.
public void testModuleExistsSeverity() {
ModuleToImport existing = new ModuleToImport(EXISTING_MODULE, myModule2.location, NO_DEPS);
setModules(existing, myModule1);
assertEquals(MessageType.WARNING, myModel.getStatusSeverity(existing));
myModel.setSelected(existing, true);
assertEquals(MessageType.ERROR, myModel.getStatusSeverity(existing));
}
Aggregations