use of com.intellij.openapi.vcs.impl.CancellableRunnable in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudSdkAppEngineHelperTest method testCreateFlexDeployRunner_noPersistedModule.
@Test
public void testCreateFlexDeployRunner_noPersistedModule() {
when(deploymentConfiguration.getModuleName()).thenReturn(null);
DeploymentSource flexSource = createMockDeployableDeploymentSource();
when(((AppEngineDeployable) flexSource).getEnvironment()).thenReturn(AppEngineEnvironment.APP_ENGINE_FLEX);
File mockSourceFile = mock(File.class);
when(mockSourceFile.exists()).thenReturn(true);
when(flexSource.getFile()).thenReturn(mockSourceFile);
Optional<CancellableRunnable> runner = helper.createDeployRunner(loggingHandler, flexSource, deploymentConfiguration, callback);
assertFalse(runner.isPresent());
verify(callback, times(1)).errorOccurred("No app.yaml specified for flexible deployment.");
}
Aggregations