use of com.android.tools.idea.gradle.project.sync.SdkSync in project android by JetBrains.
the class GradleProjectImporterTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myProjectName = "testProject";
SdkSync sdkSync = mock(SdkSync.class);
mySyncInvoker = mock(GradleSyncInvoker.class);
myProjectSetup = mock(NewProjectSetup.class);
myProjectFolder = mock(ProjectFolder.class);
Project project = getProject();
String projectFolderPathText = project.getBasePath();
assertNotNull(projectFolderPathText);
myProjectFolderPath = new File(projectFolderPathText);
ProjectFolder.Factory projectFolderFactory = mock(ProjectFolder.Factory.class);
when(projectFolderFactory.create(myProjectFolderPath)).thenReturn(myProjectFolder);
// Replace GradleSettings service with a mock.
myGradleSettings = mock(GradleSettings.class);
IdeComponents.replaceService(project, GradleSettings.class, myGradleSettings);
assertSame(GradleSettings.getInstance(project), myGradleSettings);
myProjectImporter = new GradleProjectImporter(sdkSync, mySyncInvoker, myProjectSetup, projectFolderFactory);
}
use of com.android.tools.idea.gradle.project.sync.SdkSync in project android by JetBrains.
the class IdeComponentsTest method testReplaceApplicationService.
public void testReplaceApplicationService() {
SdkSync mockSdkSync = mock(SdkSync.class);
IdeComponents.replaceService(SdkSync.class, mockSdkSync);
assertSame(mockSdkSync, SdkSync.getInstance());
}
Aggregations