target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testSplitLinesCRLF() { final String[] lines = TextUtils.splitLines("foo \r\n bar \r\n baz"); assertEquals(3, lines.length); assertEquals("foo ", lines[0]); assertEquals(" bar ", lines[1]); assertEquals(" baz", lines[2]); }
public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
@Test public void testSplitLinesMixtureCRLF() { final String[] lines = TextUtils.splitLines("foo \n bar \r\n baz"); assertEquals(3, lines.length); assertEquals("foo ", lines[0]); assertEquals(" bar ", lines[1]); assertEquals(" baz", lines[2]); }
public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
@Test public void testSplitLinesNull() { try { TextUtils.splitLines(null); fail("Should throw NPE"); } catch (NullPointerException ex) { } }
public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
@Test public void testSplitLinesEmpty() { assertEquals(1, TextUtils.splitLines("").length); assertEquals(1, TextUtils.splitLines(" ").length); }
public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); }
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
TextUtils { public static String[] splitLines(String text) { Preconditions.checkNotNull(text, "The parameter 'text' cannot be null"); return text.split("\\r?\\n"); } private TextUtils(); static String applyColorToText(String text, Color colorCode); static String yellow(String message); static String green(String messa...
@Test public void testFromJson() { final String testFailure = "{{{{{{{{{{{"; Object obj = null; try { obj = JsonUtils.fromJson(testString, Map.class); } catch (final Exception e) { fail("Fail to parse a json to java.util.Map."); } assertTrue(((Map<String, Object>) obj).containsKey("id")); assertTrue(((Map<String, Objec...
public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException { return GSON.fromJson(json, classOfT); }
JsonUtils { public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException { return GSON.fromJson(json, classOfT); } }
JsonUtils { public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException { return GSON.fromJson(json, classOfT); } private JsonUtils(); }
JsonUtils { public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException { return GSON.fromJson(json, classOfT); } private JsonUtils(); static T fromJson(String json, Class<T> classOfT); static String toJson(Object src); }
JsonUtils { public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException { return GSON.fromJson(json, classOfT); } private JsonUtils(); static T fromJson(String json, Class<T> classOfT); static String toJson(Object src); }
@Test public void testToJson() { final ObjectForJson objForJson = JsonUtils.fromJson(testString, ObjectForJson.class); final String json = JsonUtils.toJson(objForJson); assertEquals(testString, json); }
public static String toJson(Object src) { return GSON.toJson(src); }
JsonUtils { public static String toJson(Object src) { return GSON.toJson(src); } }
JsonUtils { public static String toJson(Object src) { return GSON.toJson(src); } private JsonUtils(); }
JsonUtils { public static String toJson(Object src) { return GSON.toJson(src); } private JsonUtils(); static T fromJson(String json, Class<T> classOfT); static String toJson(Object src); }
JsonUtils { public static String toJson(Object src) { return GSON.toJson(src); } private JsonUtils(); static T fromJson(String json, Class<T> classOfT); static String toJson(Object src); }
@Test public void doExecute() throws Exception { final ArtifactHandler handler = mock(ArtifactHandler.class); final FunctionRuntimeHandler runtimeHandler = mock(FunctionRuntimeHandler.class); final FunctionApp app = mock(FunctionApp.class); doReturn(app).when(mojoSpy).getFunctionApp(); doReturn(app).when(mojoSpy).updat...
@Override protected void doExecute() throws AzureExecutionException { try { parseConfiguration(); checkArtifactCompileVersion(); final WebAppBase target = createOrUpdateResource(); if (target == null) { throw new AzureExecutionException( String.format("Failed to get the deploy target with name: %s", getAppName())); } f...
DeployMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { parseConfiguration(); checkArtifactCompileVersion(); final WebAppBase target = createOrUpdateResource(); if (target == null) { throw new AzureExecutionException( String.format("Failed to get the deploy ...
DeployMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { parseConfiguration(); checkArtifactCompileVersion(); final WebAppBase target = createOrUpdateResource(); if (target == null) { throw new AzureExecutionException( String.format("Failed to get the deploy ...
DeployMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { parseConfiguration(); checkArtifactCompileVersion(); final WebAppBase target = createOrUpdateResource(); if (target == null) { throw new AzureExecutionException( String.format("Failed to get the deploy ...
DeployMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { parseConfiguration(); checkArtifactCompileVersion(); final WebAppBase target = createOrUpdateResource(); if (target == null) { throw new AzureExecutionException( String.format("Failed to get the deploy ...
@Test public void testXmlIndent() { final String[] lines = TextUtils.splitLines("<foo> \n <bar> \n \t<test></test></bar> \r\n </foo>"); assertEquals(" ", IndentUtil.calcXmlIndent(lines, 1, 2)); assertEquals(" \t", IndentUtil.calcXmlIndent(lines, 2, 12)); }
public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(line != null, "E...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
@Test public void testXmlIndentBadArgument() { final String[] lines = TextUtils.splitLines("<foo> \n <bar> \n \t<test></test></bar> \r\n </foo>"); try { IndentUtil.calcXmlIndent(lines, 100, 1); fail("Should throw IAE"); } catch (IllegalArgumentException ex) { } try { IndentUtil.calcXmlIndent(lines, -1, 1); fail("Should...
public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(line != null, "E...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.checkArgument(lin...
@Test public void findFunctions() throws Exception { final AnnotationHandler handler = getAnnotationHandler(); final Set<Method> functions = handler.findFunctions(Arrays.asList(getClassUrl())); assertEquals(13, functions.size()); final List<String> methodNames = functions.stream().map(f -> f.getName()).collect(Collecto...
@Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionName.class); }
AnnotationHandlerImpl implements AnnotationHandler { @Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionName.class); } }
AnnotationHandlerImpl implements AnnotationHandler { @Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionName.class); } }
AnnotationHandlerImpl implements AnnotationHandler { @Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionName.class); } @...
AnnotationHandlerImpl implements AnnotationHandler { @Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionName.class); } @...
@Test public void generateConfigurations() throws Exception { final AnnotationHandler handler = getAnnotationHandler(); final Set<Method> functions = handler.findFunctions(Arrays.asList(getClassUrl())); final Map<String, FunctionConfiguration> configMap = handler.generateConfigurations(functions); configMap.values().fo...
@Override public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException { final Map<String, FunctionConfiguration> configMap = new HashMap<>(); for (final Method method : methods) { final FunctionName functionAnnotation = method.getAnnotation(FunctionName.cla...
AnnotationHandlerImpl implements AnnotationHandler { @Override public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException { final Map<String, FunctionConfiguration> configMap = new HashMap<>(); for (final Method method : methods) { final FunctionName funct...
AnnotationHandlerImpl implements AnnotationHandler { @Override public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException { final Map<String, FunctionConfiguration> configMap = new HashMap<>(); for (final Method method : methods) { final FunctionName funct...
AnnotationHandlerImpl implements AnnotationHandler { @Override public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException { final Map<String, FunctionConfiguration> configMap = new HashMap<>(); for (final Method method : methods) { final FunctionName funct...
AnnotationHandlerImpl implements AnnotationHandler { @Override public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException { final Map<String, FunctionConfiguration> configMap = new HashMap<>(); for (final Method method : methods) { final FunctionName funct...
@Test public void publish() throws Exception { final DeployTarget deployTarget = mock(DeployTarget.class); final Map mapSettings = mock(Map.class); final File file = mock(File.class); final AppSetting storageSetting = mock(AppSetting.class); mapSettings.put(INTERNAL_STORAGE_KEY, storageSetting); doReturn(mapSettings).w...
@Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blobName = getBlobName(); final String packageUri = uploadPackageToAzureSto...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blobName = getBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blobName = getBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blobName = getBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blobName = getBlo...
@Test public void createZipPackage() throws Exception { buildHandler(); final File zipPackage = handlerSpy.createZipPackage(); assertTrue(zipPackage.exists()); }
protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat(Constants.ZIP_EXT)); return zipPackage; }
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat...
@Test public void uploadPackageToAzureStorage() throws Exception { final CloudStorageAccount storageAccount = mock(CloudStorageAccount.class); final CloudBlobClient blobClient = mock(CloudBlobClient.class); doReturn(blobClient).when(storageAccount).createCloudBlobClient(); final CloudBlobContainer blobContainer = mock(...
protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.uploadFileAsBlob(zipPackage, storageAccount, DEPLOYMENT_PACKAGE_CONTAINER...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.uploadFileAsBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.uploadFileAsBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.uploadFileAsBlo...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.uploadFileAsBlo...
@Test public void deployWithPackageUri() throws Exception { final FunctionApp app = mock(FunctionApp.class); final DeployTarget deployTarget = mock(DeployTarget.class); final WithPackageUri withPackageUri = mock(WithPackageUri.class); doReturn(withPackageUri).when(app).deploy(); final WithExecute withExecute = mock(Wit...
protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFinish.run(); } }
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFinish.run(); } } ...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFinish.run(); } } ...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFinish.run(); } } ...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFinish.run(); } } ...
@Test public void deletePackageFromAzureStorage() throws Exception { final CloudStorageAccount storageAccount = mock(CloudStorageAccount.class); final CloudBlobClient blobClient = mock(CloudBlobClient.class); doReturn(blobClient).when(storageAccount).createCloudBlobClient(); final CloudBlobContainer blobContainer = moc...
protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.prompt(DELETE_PACKAGE_DONE + blobName); } catch (Exception e) { Log.error(DEL...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.prompt(DELETE_PACKA...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.prompt(DELETE_PACKA...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.prompt(DELETE_PACKA...
MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.prompt(DELETE_PACKA...
@Test public void testGetCloudStorageAccount() throws Exception { final String storageConnection = "DefaultEndpointsProtocol=https;AccountName=123456;AccountKey=12345678;EndpointSuffix=core.windows.net"; final Map mapSettings = mock(Map.class); final DeployTarget deployTarget = mock(DeployTarget.class); final AppSettin...
public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != null) { final String value...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
@Test public void updateFunctionApp() throws Exception { final FunctionApp app = mock(FunctionApp.class); final Update update = mock(Update.class); doNothing().when(mojoSpy).configureAppSettings(any(Consumer.class), anyMap()); final FunctionRuntimeHandler functionRuntimeHandler = mock(WindowsFunctionRuntimeHandler.clas...
protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = runtimeHandler.updateAppRuntime(app); updateFunctionAppSe...
DeployMojo extends AbstractFunctionMojo { protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = runtimeHandler....
DeployMojo extends AbstractFunctionMojo { protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = runtimeHandler....
DeployMojo extends AbstractFunctionMojo { protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = runtimeHandler....
DeployMojo extends AbstractFunctionMojo { protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = runtimeHandler....
@Test public void testGetCloudStorageAccountWithException() { final FunctionApp app = mock(FunctionApp.class); final DeployTarget deployTarget = mock(DeployTarget.class); final Map appSettings = mock(Map.class); doReturn(appSettings).when(app).getAppSettings(); doReturn(null).when(appSettings).get(anyString()); String ...
public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != null) { final String value...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if (setting != n...
@Test public void testUpdateAppSetting() throws Exception { final DeployTarget deployTarget = mock(DeployTarget.class); final FunctionApp functionApp = mock(FunctionApp.class); doReturn(functionApp).when(deployTarget).getApp(); final FunctionApp.Update update = mock(FunctionApp.Update.class); doReturn(update).when(func...
public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).apply(); } else if (target...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
@Test public void testUpdateAppSettingWithException() { final DeployTarget deployTarget = mock(DeployTarget.class); final WebApp webapp = mock(WebApp.class); doReturn(webapp).when(deployTarget).getApp(); final String appSettingKey = "KEY"; final String appSettingValue = "VALUE"; String exceptionMessage = null; try { Fu...
public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).apply(); } else if (target...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting(key, value).a...
@Test public void testCreateFunctionArtifactWithException() { String exceptionMessage = null; try { FunctionArtifactHelper.createFunctionArtifact(""); } catch (Exception e) { exceptionMessage = e.getMessage(); } finally { assertEquals("Azure Functions stage directory not found. Please run 'mvn clean" + " azure-function...
public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() || !stageDirectory.isDirectory()) { thr...
FunctionArtifactHelper { public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() || !stageDirec...
FunctionArtifactHelper { public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() || !stageDirec...
FunctionArtifactHelper { public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() || !stageDirec...
FunctionArtifactHelper { public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() || !stageDirec...
@Test public void installExtension() throws Exception { final CommandHandler commandHandler = mock(CommandHandler.class); final FunctionCoreToolsHandlerImpl functionCoreToolsHandler = new FunctionCoreToolsHandlerImpl(commandHandler); final FunctionCoreToolsHandlerImpl functionCoreToolsHandlerSpy = spy(functionCoreTools...
@Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); }
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { @Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); } }
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { @Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); } FunctionCoreToolsHandlerImpl(final CommandHandler commandHa...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { @Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); } FunctionCoreToolsHandlerImpl(final CommandHandler commandHa...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { @Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); } FunctionCoreToolsHandlerImpl(final CommandHandler commandHa...
@Test public void getLocalFunctionCoreToolsVersion() throws Exception { final CommandHandler commandHandler = mock(CommandHandler.class); final FunctionCoreToolsHandlerImpl functionCoreToolsHandler = new FunctionCoreToolsHandlerImpl(commandHandler); final FunctionCoreToolsHandlerImpl functionCoreToolsHandlerSpy = spy(f...
protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET_LOCAL_VERSION_FAIL); return null; } }
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
@Test public void getLocalFunctionCoreToolsVersionFailed() throws Exception { final CommandHandler commandHandler = mock(CommandHandler.class); final FunctionCoreToolsHandlerImpl functionCoreToolsHandler = new FunctionCoreToolsHandlerImpl(commandHandler); final FunctionCoreToolsHandlerImpl functionCoreToolsHandlerSpy =...
protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET_LOCAL_VERSION_FAIL); return null; } }
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) { Log.warn(GET...
@Test public void installFunctionExtension() throws Exception { final CommandHandler commandHandler = mock(CommandHandler.class); final FunctionCoreToolsHandlerImpl functionCoreToolsHandler = new FunctionCoreToolsHandlerImpl(commandHandler); final FunctionCoreToolsHandlerImpl functionCoreToolsHandlerSpy = spy(functionC...
protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, stagingDirector.getAbsolutePath(), CommandUtils.getDefaultValidReturnCodes(), INSTA...
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, stagingDirector....
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, stagingDirector....
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, stagingDirector....
FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, stagingDirector....
@Test public void buildCommand() { assertEquals(3, CommandHandlerImpl.buildCommand("cmd").length); }
protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; }
CommandHandlerImpl implements CommandHandler { protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; } }
CommandHandlerImpl implements CommandHandler { protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; } }
CommandHandlerImpl implements CommandHandler { protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; } @Override void runCommandWithReturnCodeCheck(final String command, ...
CommandHandlerImpl implements CommandHandler { protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; } @Override void runCommandWithReturnCodeCheck(final String command, ...
@Test public void getStdoutRedirect() { assertEquals(ProcessBuilder.Redirect.INHERIT, CommandHandlerImpl.getStdoutRedirect(true)); assertEquals(ProcessBuilder.Redirect.PIPE, CommandHandlerImpl.getStdoutRedirect(false)); }
protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; }
CommandHandlerImpl implements CommandHandler { protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; } }
CommandHandlerImpl implements CommandHandler { protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; } }
CommandHandlerImpl implements CommandHandler { protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; } @Override void runCommandWithReturnCodeCheck(final String command, ...
CommandHandlerImpl implements CommandHandler { protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; } @Override void runCommandWithReturnCodeCheck(final String command, ...
@Test public void configureAppSettings() throws Exception { final WithCreate withCreate = mock(WithCreate.class); mojo.configureAppSettings(withCreate::withAppSettings, mojo.getAppSettingsWithDefaultValue()); verify(withCreate, times(1)).withAppSettings(anyMap()); }
protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } }
DeployMojo extends AbstractFunctionMojo { protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } } }
DeployMojo extends AbstractFunctionMojo { protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } } }
DeployMojo extends AbstractFunctionMojo { protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } } @Override DeploymentType getDeploymentType(); }
DeployMojo extends AbstractFunctionMojo { protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } } @Override DeploymentType getDeploymentType(); }
@Test(expected = Exception.class) public void handleExitValue() throws Exception { final CommandHandlerImpl handler = new CommandHandlerImpl(); handler.handleExitValue(1, Arrays.asList(0L), "", null); }
protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.contains(Integer.toUnsignedLong(exitValue))) { showErrorIfAny(inpu...
CommandHandlerImpl implements CommandHandler { protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.contains(Integer.to...
CommandHandlerImpl implements CommandHandler { protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.contains(Integer.to...
CommandHandlerImpl implements CommandHandler { protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.contains(Integer.to...
CommandHandlerImpl implements CommandHandler { protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.contains(Integer.to...
@Test public void isWindows() { assertEquals(SystemUtils.IS_OS_WINDOWS, CommandUtils.isWindows()); }
public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; }
CommandUtils { public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; } }
CommandUtils { public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; } }
CommandUtils { public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
CommandUtils { public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
@Test public void getDefaultValidReturnCodes() throws Exception { assertEquals(2, CommandUtils.getValidReturnCodes().size()); assertEquals(true, CommandUtils.getValidReturnCodes().contains(0L)); }
public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); }
CommandUtils { public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); } }
CommandUtils { public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); } }
CommandUtils { public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
CommandUtils { public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
@Test public void getValidReturnCodes() { assertEquals(Arrays.asList(0L), CommandUtils.getDefaultValidReturnCodes()); }
public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); }
CommandUtils { public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); } }
CommandUtils { public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); } }
CommandUtils { public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
CommandUtils { public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }
@Test public void uploadDirectoryWithRetries() throws Exception { final FTPUploader uploaderSpy = spy(ftpUploader); AzureExecutionException exception = null; doReturn(false).when(uploaderSpy).uploadDirectory(anyString(), anyString(), anyString(), anyString(), anyString()); try { uploaderSpy.uploadDirectoryWithRetries("...
public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCount++; Log.prompt(UPLOAD_STAR...
FTPUploader { public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCount++; Log.prom...
FTPUploader { public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCount++; Log.prom...
FTPUploader { public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCount++; Log.prom...
FTPUploader { public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCount++; Log.prom...
@Test public void uploadDirectory() throws Exception { final FTPUploader uploaderSpy = spy(ftpUploader); final FTPClient ftpClient = mock(FTPClient.class); doReturn(ftpClient).when(uploaderSpy).getFTPClient(anyString(), anyString(), anyString()); doNothing().when(uploaderSpy).uploadDirectory(any(FTPClient.class), anySt...
protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password); Log.prompt(String.format(UP...
FTPUploader { protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password); Log.prompt(St...
FTPUploader { protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password); Log.prompt(St...
FTPUploader { protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password); Log.prompt(St...
FTPUploader { protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password); Log.prompt(St...
@Test public void getFTPClient() throws Exception { Exception caughtException = null; try { ftpUploader.getFTPClient("fakeFTPServer", "username", "password"); } catch (Exception e) { caughtException = e; } finally { assertNotNull(caughtException); } }
protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.enterLocalPassiveMode(); retu...
FTPUploader { protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.enterLocalPassi...
FTPUploader { protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.enterLocalPassi...
FTPUploader { protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.enterLocalPassi...
FTPUploader { protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.enterLocalPassi...
@Test public void testParseOperationSystem() throws Exception { assertEquals(OperatingSystemEnum.Windows, Utils.parseOperationSystem("windows")); assertEquals(OperatingSystemEnum.Linux, Utils.parseOperationSystem("Linux")); assertEquals(OperatingSystemEnum.Docker, Utils.parseOperationSystem("dOcker")); }
public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": return Opera...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
@Test public void testParseOperationSystemUnknown() throws Exception { try { Utils.parseOperationSystem("unkown"); fail("expected AzureExecutionException when os is invalid"); } catch (AzureExecutionException ex) { } try { Utils.parseOperationSystem("windows "); fail("expected AzureExecutionException when os has spaces...
public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": return Opera...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": retu...
@Test public void getProject() throws Exception { assertEquals(project, mojo.getProject()); }
public MavenProject getProject() { return project; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenProject getProject() { return project; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenProject getProject() { return project; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenProject getProject() { return project; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settings getSe...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenProject getProject() { return project; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settings getSe...
@Test(expected = AzureExecutionException.class) public void getArtifactHandlerThrowException() throws Exception { getMojoFromPom().getArtifactHandler(); }
protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString()); switch (deploymentType) { case MSDEPLOY: builder =...
DeployMojo extends AbstractFunctionMojo { protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString()); switch (...
DeployMojo extends AbstractFunctionMojo { protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString()); switch (...
DeployMojo extends AbstractFunctionMojo { protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString()); switch (...
DeployMojo extends AbstractFunctionMojo { protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString()); switch (...
@Test public void getSession() throws Exception { assertEquals(session, mojo.getSession()); }
public MavenSession getSession() { return session; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenSession getSession() { return session; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenSession getSession() { return session; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenSession getSession() { return session; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settings getSe...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenSession getSession() { return session; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settings getSe...
@Test public void getMavenResourcesFiltering() throws Exception { assertEquals(filtering, mojo.getMavenResourcesFiltering()); }
public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenRes...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenRes...
@Test public void getBuildDirectoryAbsolutePath() throws Exception { assertEquals("target", mojo.getBuildDirectoryAbsolutePath()); }
public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResource...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResource...
@Test public void getAuthenticationSetting() throws Exception { assertEquals(authenticationSetting, mojo.getAuthenticationSetting()); }
@Override public AuthenticationSetting getAuthenticationSetting() { return authentication; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public AuthenticationSetting getAuthenticationSetting() { return authentication; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public AuthenticationSetting getAuthenticationSetting() { return authentication; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public AuthenticationSetting getAuthenticationSetting() { return authentication; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResour...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public AuthenticationSetting getAuthenticationSetting() { return authentication; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResour...
@Test public void getAzureClient() throws Exception { assertEquals(azure, mojo.getAzureClient()); }
public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) { Log.warn("You are using an old way of authentication which will be deprecated in future versions, pl...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) { Log.wa...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) { Log.wa...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) { Log.wa...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) { Log.wa...
@Test public void getMavenSettings() { assertEquals(settings, mojo.getSettings()); }
@Override public Settings getSettings() { return settings; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Settings getSettings() { return settings; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Settings getSettings() { return settings; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Settings getSettings() { return settings; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settin...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Settings getSettings() { return settings; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Settin...
@Test public void getSubscriptionId() throws Exception { assertEquals(SUBSCRIPTION_ID, mojo.getSubscriptionId()); }
@Override public String getSubscriptionId() { return subscriptionId; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public String getSubscriptionId() { return subscriptionId; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public String getSubscriptionId() { return subscriptionId; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public String getSubscriptionId() { return subscriptionId; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Overr...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public String getSubscriptionId() { return subscriptionId; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Overr...
@Test public void getTelemetryProxy() { assertEquals(telemetryProxy, mojo.getTelemetryProxy()); }
public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResource...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResource...
@Test public void isTelemetryAllowed() throws Exception { assertTrue(!mojo.isTelemetryAllowed()); }
public boolean isTelemetryAllowed() { return allowTelemetry; }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public boolean isTelemetryAllowed() { return allowTelemetry; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public boolean isTelemetryAllowed() { return allowTelemetry; } }
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public boolean isTelemetryAllowed() { return allowTelemetry; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Sett...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public boolean isTelemetryAllowed() { return allowTelemetry; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override Sett...
@Test public void execute() throws Exception { mojo.execute(); }
@Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(prop)) { infoWithMultipleLines(PRIVACY_STATEMENT); updateConfigurationFile(prop); } if (isSkipMojo()) { Log.inf...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(prop)) { infoWith...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(prop)) { infoWith...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(prop)) { infoWith...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(prop)) { infoWith...
@Test public void testGetDeploymentTypeByRuntime() throws AzureExecutionException { doReturn(Windows).when(mojoSpy).getOsEnum(); assertEquals(RUN_FROM_ZIP, mojoSpy.getDeploymentTypeByRuntime()); doReturn(Linux).when(mojoSpy).getOsEnum(); doReturn(true).when(mojoSpy).isDedicatedPricingTier(); assertEquals(RUN_FROM_ZIP, ...
protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZIP : RUN_FROM_BLOB; default: return RUN_FROM_ZIP; } }
DeployMojo extends AbstractFunctionMojo { protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZIP : RUN_FROM_B...
DeployMojo extends AbstractFunctionMojo { protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZIP : RUN_FROM_B...
DeployMojo extends AbstractFunctionMojo { protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZIP : RUN_FROM_B...
DeployMojo extends AbstractFunctionMojo { protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZIP : RUN_FROM_B...
@Test public void testPluginConfigurationFromPluginManagement() throws Exception { final File pom = new File(this.getClass().getClassLoader().getResource("pom-2.xml").getFile()); final Model model = TestHelper.readMavenModel(pom); final MavenProject project = Mockito.mock(MavenProject.class); Mockito.when(project.getMo...
public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) { final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey); return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration(); }
MavenUtils { public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) { final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey); return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration(); } }
MavenUtils { public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) { final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey); return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration(); } private MavenUtils(); }
MavenUtils { public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) { final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey); return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration(); } private MavenUtils(); static Xpp3Dom getPluginConfiguration(M...
MavenUtils { public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) { final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey); return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration(); } private MavenUtils(); static Xpp3Dom getPluginConfiguration(M...
@Test public void processException() throws Exception { final String message = "test exception message"; String actualMessage = null; try { mojo.handleException(new Exception(message)); } catch (Exception e) { actualMessage = e.getMessage(); } assertEquals(message, actualMessage); }
protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFailure(message); if (isFailingOnError()) { throw new MojoExecutionException(message, exception); } else { Log...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFailure(message)...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFailure(message)...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFailure(message)...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFailure(message)...
@Test public void getTelemetryProperties() throws Exception { final Map map = mojo.getTelemetryProperties(); assertEquals(5, map.size()); assertTrue(map.containsKey(INSTALLATION_ID_KEY)); assertTrue(map.containsKey(PLUGIN_NAME_KEY)); assertTrue(map.containsKey(PLUGIN_VERSION_KEY)); assertTrue(map.containsKey(SUBSCRIPTI...
@Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.put(PLUGIN_VERSION_KEY, getPluginVersion()); map.put(SUBSCRIPTION_ID_KEY, getSubscriptionId()); map.put(SESSI...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.put(PLUGIN_VERS...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.put(PLUGIN_VERS...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.put(PLUGIN_VERS...
AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.put(PLUGIN_VERS...
@Test public void processSettings() throws Exception { final WithCreate withCreate = mock(WithCreate.class); handler.processSettings(withCreate); verify(withCreate, times(1)).withAppSettings(ArgumentMatchers.<String, String>anyMap()); }
@Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } }
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } }
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
@Test public void processSettings1() throws Exception { final Update update = mock(Update.class); handler.processSettings(update); verify(update, times(1)).withAppSettings(ArgumentMatchers.<String, String>anyMap()); }
@Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } }
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } }
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImpl(final Abstra...
@Test public void createDeploymentSlotIfNotExist() throws AzureAuthFailureException, AzureExecutionException { final DeploymentSlotHandler handlerSpy = spy(handler); final DeploymentSlotSetting slotSetting = mock(DeploymentSlotSetting.class); final WebApp app = mock(WebApp.class); doReturn(app).when(mojo).getWebApp(); ...
public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotName = slotSetting.getName(); if (this....
DeploymentSlotHandler { public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotName = slotSett...
DeploymentSlotHandler { public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotName = slotSett...
DeploymentSlotHandler { public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotName = slotSett...
DeploymentSlotHandler { public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotName = slotSett...
@Test public void createDeploymentSlotFromParent() throws AzureExecutionException { final DeploymentSlotHandler handlerSpy = spy(handler); final WebApp app = mock(WebApp.class); final DeploymentSlots slots = mock(DeploymentSlots.class); final Blank stage1 = mock(Blank.class); final WithCreate withCreate = mock(WithCrea...
protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSourceType type = Configurat...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
@Test(expected = AzureExecutionException.class) public void createDeploymentSlotFromOtherDeploymentSlotThrowException() throws AzureExecutionException { final WebApp app = mock(WebApp.class); handler.createDeploymentSlot(app, "", "otherSlot"); }
protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSourceType type = Configurat...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
@Test(expected = AzureExecutionException.class) public void assureValidSlotNameThrowException() throws AzureExecutionException { final DeploymentSlotHandler handlerSpy = spy(handler); handlerSpy.assureValidSlotName("@#123"); }
protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_SLOT_NAME); } }
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
@Test public void assureValidSlotName() throws AzureExecutionException { final DeploymentSlotHandler handlerSpy = spy(handler); handlerSpy.assureValidSlotName("slot-Name"); verify(handlerSpy, times(1)).assureValidSlotName("slot-Name"); }
protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_SLOT_NAME); } }
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionException(INVALID_...
@Test public void createBreadNewDeploymentSlot() throws AzureExecutionException { final DeploymentSlotHandler handlerSpy = spy(handler); final WebApp app = mock(WebApp.class); final DeploymentSlots slots = mock(DeploymentSlots.class); final Blank stage1 = mock(Blank.class); final WithCreate withCreate = mock(WithCreate...
protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSourceType type = Configurat...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final ConfigurationSour...
@Test public void testCreateDeploymentSlot() throws AzureAuthFailureException, AzureExecutionException { final FunctionDeploymentSlot slot = mock(FunctionDeploymentSlot.class); final DeploymentSlotSetting slotSetting = new DeploymentSlotSetting(); slotSetting.setName("Test"); doReturn(slotSetting).when(mojoSpy).getDepl...
protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSetting = getDeploymentSlotSetting(); final FunctionDeployme...
DeployMojo extends AbstractFunctionMojo { protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSetting = getDeplo...
DeployMojo extends AbstractFunctionMojo { protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSetting = getDeplo...
DeployMojo extends AbstractFunctionMojo { protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSetting = getDeplo...
DeployMojo extends AbstractFunctionMojo { protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSetting = getDeplo...
@Test public void updateAppRuntimeTestV2() throws Exception { final WebApp app = mock(WebApp.class); final SiteInner siteInner = mock(SiteInner.class); doReturn(siteInner).when(app).inner(); doReturn("app,linux").when(siteInner).kind(); final WebApp.Update update = mock(WebApp.Update.class); doReturn(update).when(app)....
@Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); @Override WebApp.DefinitionStages.Wit...
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); @Override WebApp.DefinitionStages.Wit...
@Test public void updateAppRuntimeTestV1() throws Exception { final WebApp app = mock(WebApp.class); final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); doReturn(siteInner).when(app).inner(); final Update update = mock(Update.class); doReturn(update).when(app).update(); doRe...
@Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); }
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); @Override WebApp.DefinitionStages.Wit...
LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); @Override WebApp.DefinitionStages.Wit...
@Test public void updateAppRuntimeV2() throws Exception { final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); final WebApp.Update update = mock(WebApp.Update.class); final WebApp app = mock(WebApp.class); doReturn(siteInner).when(app).inner(); doReturn(update).when(app).upda...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); }
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } }
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
@Test public void updateAppRuntimeV1() throws Exception { final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); final Update update = mock(Update.class); final WebApp app = mock(WebApp.class); doReturn(siteInner).when(app).inner(); doReturn(update).when(app).update(); doReturn...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); }
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } }
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final PublicDockerHubR...
@Test public void defineAppWithRuntime() throws Exception { AzureExecutionException exception = null; try { handler.defineAppWithRuntime(); } catch (AzureExecutionException e) { exception = e; } finally { assertNotNull(exception); } }
@Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); } }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); } }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Override AppServicePl...
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Override AppServicePl...
@Test public void updateAppRuntime() { final WebApp app = mock(WebApp.class); assertNull(handler.updateAppRuntime(app)); }
@Override public Update updateAppRuntime(final WebApp app) { return null; }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public Update updateAppRuntime(final WebApp app) { return null; } }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public Update updateAppRuntime(final WebApp app) { return null; } }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public Update updateAppRuntime(final WebApp app) { return null; } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Override AppServicePlan updateAppServicePlan(final WebApp app); }
NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public Update updateAppRuntime(final WebApp app) { return null; } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Override AppServicePlan updateAppServicePlan(final WebApp app); static final String N...
@Test public void updateAppRuntimeV2() throws Exception { final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); final WebApp.UpdateStages.WithCredentials withCredentials = mock(WebApp.UpdateStages.WithCredentials.class); final WebApp.Update update = mock(WebApp.Update.class); ...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(), dockerCredentialProvider.getPassword()); }
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
@Test public void updateAppRuntimeV1() throws Exception { final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); final WithCredentials withCredentials = mock(WithCredentials.class); final Update update = mock(Update.class); doReturn(withCredentials).when(update).withPrivateRegi...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(), dockerCredentialProvider.getPassword()); }
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvider.getUsername(...
@Test public void updateAppRuntimeTestV1() throws Exception { final SiteInner siteInner = mock(SiteInner.class); doReturn("app").when(siteInner).kind(); final WithWebContainer withWebContainer = mock(WithWebContainer.class); final Update update = mock(Update.class); doReturn(withWebContainer).when(update).withJavaVersi...
@Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; }
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } }
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
@Test public void updateAppRuntimeTestV2() throws Exception { final WebApp app = mock(WebApp.class); final SiteInner siteInner = mock(SiteInner.class); doReturn(siteInner).when(app).inner(); doReturn("app").when(siteInner).kind(); doReturn(WebContainer.TOMCAT_8_5_NEWEST).when(config).getWebContainer(); doReturn(JavaVer...
@Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; }
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } }
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; } private Win...
@Test public void doExecute() throws Exception { final PackageMojo mojo = getMojoFromPom(); final PackageMojo mojoSpy = spy(mojo); final Set<Method> methods = new HashSet<>(Arrays.asList(this.getClass().getMethods())); ReflectionUtils.setVariableValueInObject(mojoSpy, "finalName", "artifact-0.1.0"); doReturn(mock(Annot...
@Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedURLException e) { throw new AzureExecutionException("Inval...
PackageMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedURLException e)...
PackageMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedURLException e)...
PackageMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedURLException e)...
PackageMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedURLException e)...
@Test public void updateAppRuntimeV2() throws Exception { final WebApp app = mock(WebApp.class); final SiteInner siteInner = mock(SiteInner.class); doReturn(siteInner).when(app).inner(); doReturn("app,linux").when(siteInner).kind(); final WebApp.Update update = mock(WebApp.Update.class); final WebApp.UpdateStages.WithC...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCredentialProvider.getPassword()); }
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
@Test public void updateAppRuntimeV1() throws Exception { final WebApp app = mock(WebApp.class); final SiteInner siteInner = mock(SiteInner.class); doReturn("app,linux").when(siteInner).kind(); doReturn(siteInner).when(app).inner(); final Update update = mock(Update.class); final WithCredentials withCredentials = mock(...
@Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCredentialProvider.getPassword()); }
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUsername(), dockerCr...
@Test(expected = AzureExecutionException.class) public void publishArtifactsViaWarDeployThrowException() throws AzureExecutionException { final DeployTarget target = mock(DeployTarget.class); final String stagingDirectoryPath = ""; final List<File> warArtifacts = null; buildHandler(); handlerSpy.publishArtifactsViaWarD...
protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String.format("There is no war artifacts to deploy in stagi...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
@Test public void publishArtifactsViaWarDeploy() throws AzureExecutionException { final WebApp app = mock(WebApp.class); final DeployTarget target = new WebAppDeployTarget(app); final String stagingDirectory = Paths.get(Paths.get("").toAbsolutePath().toString(), "maven-plugin-temp").toString(); final List<File> artifac...
protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String.format("There is no war artifacts to deploy in stagi...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionException( String....
@Test public void publishArtifactsViaZipDeploy() throws AzureExecutionException { final DeployTarget target = mock(DeployTarget.class); final File zipTestDirectory = new File("src/test/resources/artifacthandlerv2"); final String stagingDirectoryPath = zipTestDirectory.getAbsolutePath(); doNothing().when(target).zipDepl...
protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory = new File(stagingDirectoryPath); final File zipFile = Utils.crea...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory = new File(st...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory = new File(st...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory = new File(st...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory = new File(st...
@Test public void isJavaSERuntime() throws Exception { final MavenProject mavenProject = TestUtils.getSimpleMavenProjectForUnitTest(); final IProject project = ProjectUtils.convertCommonProject(mavenProject); final RuntimeSetting runtimeSetting = mock(RuntimeSetting.class); handler = new ArtifactHandlerImplV2.Builder()...
protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getOsEnum() == OperatingSystemEnum.Windows ? runtimeSetting.getWebCont...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getOsEnum() == Ope...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getOsEnum() == Ope...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getOsEnum() == Ope...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getOsEnum() == Ope...
@Test public void publishWarArtifact() throws AzureExecutionException { final WebAppDeployTarget target = mock(WebAppDeployTarget.class); final File warArtifact = new File("D:\\temp\\dummypath"); final String contextPath = "dummy"; doNothing().when(target).warDeploy(warArtifact, contextPath); buildHandler(); handlerSpy...
public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war file %s...", warArtifact.getName())); final boolean...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
@Test(expected = AzureExecutionException.class) public void publishWarArtifactThrowException() throws AzureExecutionException { final WebAppDeployTarget target = mock(WebAppDeployTarget.class); final File warArtifact = new File("D:\\temp\\dummypath"); final String contextPath = "dummy"; doThrow(RuntimeException.class)....
public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war file %s...", warArtifact.getName())); final boolean...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Deploying the war...
@Test public void publish() throws Exception { final File file = new File(""); final String path = ""; final WebApp appMock = mock(WebApp.class); doReturn(appMock).when(mojo).getWebApp(); doNothing().when(appMock).warDeploy(any(File.class), anyString()); buildHandler(); doReturn(file).when(handlerSpy).getWarFile(); doN...
@Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath()); Log.info(String.format(DEPLOY_START, target.getName())); in...
WarArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath()); Log.in...
WarArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath()); Log.in...
WarArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath()); Log.in...
WarArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath()); Log.in...
@Test public void getContextPath() { doReturn("/").when(mojo).getPath(); buildHandler(); assertEquals(handlerSpy.getContextPath(), ""); doReturn(" / ").when(mojo).getPath(); buildHandler(); assertEquals(handlerSpy.getContextPath(), ""); doReturn("/test").when(mojo).getPath(); buildHandler(); assertEquals(handlerSpy.get...
protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; } }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final DeployTarget ta...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final DeployTarget ta...
@Test public void getAnnotationHandler() throws Exception { final PackageMojo mojo = getMojoFromPom(); final AnnotationHandler handler = mojo.getAnnotationHandler(); assertNotNull(handler); assertTrue(handler instanceof AnnotationHandlerImpl); }
protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); }
PackageMojo extends AbstractFunctionMojo { protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); } }
PackageMojo extends AbstractFunctionMojo { protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); } }
PackageMojo extends AbstractFunctionMojo { protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); } @Override List<Resource> getResources(); }
PackageMojo extends AbstractFunctionMojo { protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); } @Override List<Resource> getResources(); static final String SEARCH_FUNCTIONS; static final String FOUND_FUNCTIONS; static final String NO_FUNCTIONS; static final String GENERATE_CONFIG...
@Test public void getWarFile() { doReturn(null).when(mojo).getWarFile(); doReturn("buildDirectory").when(mojo).getBuildDirectoryAbsolutePath(); final MavenProject projectMock = mock(MavenProject.class); final Build buildMock = mock(Build.class); doReturn(projectMock).when(mojo).getProject(); doReturn(buildMock).when(pr...
protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); } }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); }
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final DeployTarget tar...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final DeployTarget tar...
@Test(expected = AzureExecutionException.class) public void assureWarFileExistedWhenFileExtWrong() throws AzureExecutionException { buildHandler(); handlerSpy.assureWarFileExisted(new File("test.jar")); }
protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecutionException(String.format(FIND_WAR_FILE_FAIL, war.g...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
@Test(expected = AzureExecutionException.class) public void assureWarFileExistedWhenFileNotExist() throws AzureExecutionException { final File fileMock = mock(File.class); doReturn("test.war").when(fileMock).getName(); doReturn(false).when(fileMock).exists(); buildHandler(); handlerSpy.assureWarFileExisted(fileMock); }
protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecutionException(String.format(FIND_WAR_FILE_FAIL, war.g...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
@Test(expected = AzureExecutionException.class) public void assureWarFileExistedWhenIsNotAFile() throws AzureExecutionException { final File fileMock = mock(File.class); doReturn("test.war").when(fileMock).getName(); doReturn(false).when(fileMock).exists(); doReturn(false).when(fileMock).isFile(); buildHandler(); handl...
protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecutionException(String.format(FIND_WAR_FILE_FAIL, war.g...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
@Test public void assureWarFileExisted() throws AzureExecutionException { final File file = mock(File.class); doReturn("test.war").when(file).getName(); doReturn(true).when(file).exists(); doReturn(true).when(file).isFile(); buildHandler(); handlerSpy.assureWarFileExisted(file); verify(file).getName(); verify(file).exi...
protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecutionException(String.format(FIND_WAR_FILE_FAIL, war.g...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw new AzureExecu...
@Test public void publish() throws Exception { final DeployTarget deployTarget = new WebAppDeployTarget(this.mojo.getWebApp()); buildHandler(); doNothing().when(handlerSpy).publish(deployTarget); handlerSpy.publish(deployTarget); verify(handlerSpy).publish(deployTarget); }
@Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Cannot copy jar to staging directory: '%s'", jar), e); } supe...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
@Test public void publishToDeploymentSlot() throws Exception { final DeploymentSlot slot = mock(DeploymentSlot.class); final DeployTarget deployTarget = new DeploymentSlotDeployTarget(slot); buildHandler(); doNothing().when(handlerSpy).publish(deployTarget); handlerSpy.publish(deployTarget); verify(handlerSpy).publish(...
@Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Cannot copy jar to staging directory: '%s'", jar), e); } supe...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String.format("Canno...
@Test public void prepareDeploymentFiles() throws IOException { }
protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); } }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); } protected JarArtifactHandlerImpl(final Builder builder); }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); } protected JarArtifactHandlerImpl(final Builder builder); @...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); } protected JarArtifactHandlerImpl(final Builder builder); @...
@Test public void getJarFile() { doReturn("test.jar").when(mojo).getJarFile(); buildHandler(); assertEquals("test.jar", handlerSpy.getJarFile().getName()); final MavenProject project = mock(MavenProject.class); doReturn(project).when(mojo).getProject(); buildHandler(); assertEquals("test.jar", handlerSpy.getJarFile().g...
protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); } }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); } protected JarArtifactHandlerImpl(final Builder builder); }
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); } protected JarArtifactHandlerImpl(final Builder builder); @Override void publish(DeployTarget...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); } protected JarArtifactHandlerImpl(final Builder builder); @Override void publish(DeployTarget...
@Test(expected = AzureExecutionException.class) public void assureJarFileExistedWhenFileExtWrong() throws AzureExecutionException { buildHandler(); handlerSpy.assureJarFileExisted(new File("test.jar")); }
protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutionException(String.format(FIND_JAR_FILE_FAIL, jar.getAbso...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
@Test public void getScriptFilePath() throws Exception { final PackageMojo mojo = getMojoFromPom(); final PackageMojo mojoSpy = spy(mojo); ReflectionUtils.setVariableValueInObject(mojoSpy, "finalName", "artifact-0.1.0"); final String finalName = mojoSpy.getScriptFilePath(); assertEquals("../artifact-0.1.0.jar", finalNa...
protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); }
PackageMojo extends AbstractFunctionMojo { protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); } }
PackageMojo extends AbstractFunctionMojo { protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); } }
PackageMojo extends AbstractFunctionMojo { protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); } @Override List<Resource> getResources(); }
PackageMojo extends AbstractFunctionMojo { protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); } @Override List<Resource> getResources(); static final String SEARCH_FUNCTIONS; static final String FOUND_FUNCTIONS; static final...
@Test(expected = AzureExecutionException.class) public void assureJarFileExistedWhenFileNotExist() throws AzureExecutionException { buildHandler(); final File fileMock = mock(File.class); doReturn("test.jar").when(fileMock).getName(); doReturn(false).when(fileMock).exists(); handlerSpy.assureJarFileExisted(fileMock); }
protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutionException(String.format(FIND_JAR_FILE_FAIL, jar.getAbso...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
@Test(expected = AzureExecutionException.class) public void assureJarFileExistedWhenIsNotAFile() throws AzureExecutionException { final File fileMock = mock(File.class); doReturn("test.jar").when(fileMock).getName(); doReturn(false).when(fileMock).exists(); buildHandler(); handlerSpy.assureJarFileExisted(fileMock); }
protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutionException(String.format(FIND_JAR_FILE_FAIL, jar.getAbso...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
@Test public void assureJarFileExisted() throws AzureExecutionException { final File file = mock(File.class); doReturn("test.jar").when(file).getName(); doReturn(true).when(file).exists(); doReturn(true).when(file).isFile(); buildHandler(); handlerSpy.assureJarFileExisted(file); verify(file).getName(); verify(file).exi...
protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutionException(String.format(FIND_JAR_FILE_FAIL, jar.getAbso...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new AzureExecutio...
@Test public void getRuntimeHandler() throws AzureExecutionException { final WebAppConfiguration config = mock(WebAppConfiguration.class); final Azure azureClient = mock(Azure.class); final HandlerFactory factory = new HandlerFactoryImpl(); doReturn("").when(config).getAppName(); doReturn("").when(config).getResourceGr...
@Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch (config.getOs()) { case Windows: builder = new WindowsRunt...
HandlerFactoryImpl extends HandlerFactory { @Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch (config.getOs(...
HandlerFactoryImpl extends HandlerFactory { @Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch (config.getOs(...
HandlerFactoryImpl extends HandlerFactory { @Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch (config.getOs(...
HandlerFactoryImpl extends HandlerFactory { @Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch (config.getOs(...