use of com.google.cloud.tools.intellij.project.CloudProject in project google-cloud-intellij by GoogleCloudPlatform.
the class SetupCloudRepositoryDialog method doOKAction.
@Override
protected void doOKAction() {
CloudProject selectedProject = projectSelector.getSelectedProject();
projectId = selectedProject.projectId();
repositoryId = repositorySelector.getText();
remoteName = remoteNameSelector.getText();
credentialedUser = Services.getLoginService().getLoggedInUser(selectedProject.googleUsername()).orElse(null);
super.doOKAction();
}
use of com.google.cloud.tools.intellij.project.CloudProject in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineFlexibleDeploymentEditorTest method applyEditorTo_doesSetCloudProjectName.
@Test
public void applyEditorTo_doesSetCloudProjectName() {
CloudProject project = CloudProject.create("some-project", "some-project", EMAIL);
when(projectSelector.getSelectedProject()).thenReturn(project);
editor.applyEditorTo(configuration);
assertThat(configuration.getCloudProjectName()).isEqualTo(project.projectId());
}
use of com.google.cloud.tools.intellij.project.CloudProject in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineFlexibleDeploymentEditorTest method resetEditorFrom_withCloudProjectName_doesSetCloudProjectName.
@Test
public void resetEditorFrom_withCloudProjectName_doesSetCloudProjectName() {
String projectName = "some-project";
configuration.setCloudProjectName(projectName);
configuration.setGoogleUsername(EMAIL);
editor.resetEditorFrom(configuration);
CloudProject expectedProject = CloudProject.create(projectName, projectName, EMAIL);
verify(projectSelector).setSelectedProject(expectedProject);
}
use of com.google.cloud.tools.intellij.project.CloudProject in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardDeploymentEditorTest method applyEditorTo_withUser_doesSetGoogleUsername.
@Test
public void applyEditorTo_withUser_doesSetGoogleUsername() throws Exception {
when(credentialedUser.getEmail()).thenReturn(EMAIL);
String projectId = "some-project";
CloudProject project = CloudProject.create(projectId, projectId, EMAIL);
when(projectSelector.getSelectedProject()).thenReturn(project);
editor.applyEditorTo(configuration);
assertThat(configuration.getGoogleUsername()).isEqualTo(EMAIL);
}
use of com.google.cloud.tools.intellij.project.CloudProject in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardDeploymentEditorTest method applyEditorTo_doesSetCloudProjectName.
@Test
public void applyEditorTo_doesSetCloudProjectName() throws Exception {
String projectId = "some-project";
CloudProject project = CloudProject.create(projectId, projectId, EMAIL);
when(projectSelector.getSelectedProject()).thenReturn(project);
editor.applyEditorTo(configuration);
assertThat(configuration.getCloudProjectName()).isEqualTo(projectId);
}
Aggregations