use of com.android.tools.idea.gradle.project.sync.GradleSyncListener in project android by JetBrains.
the class GradleProjectImporterTest method testImportProjectWithNullProject.
public void testImportProjectWithNullProject() throws Exception {
GradleProjectImporter.Request importSettings = new GradleProjectImporter.Request();
importSettings.setProject(null).setLanguageLevel(JDK_1_8);
Project newProject = getProject();
when(myProjectSetup.createProject(myProjectName, myProjectFolderPath.getPath())).thenReturn(newProject);
GradleSyncListener syncListener = mock(GradleSyncListener.class);
myProjectImporter.importProject(myProjectName, myProjectFolderPath, importSettings, syncListener);
// Verify project setup before syncing.
verifyProjectFilesCreation();
verifyProjectCreation(times(1));
verifyProjectPreparation(JDK_1_8);
verifyGradleVmOptionsCleanup(times(1));
// Verify sync.
verifyGradleSyncInvocation(importSettings, syncListener);
}
Aggregations