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 getSettingsHandler() throws Exception { final HandlerFactory factory = new HandlerFactoryImpl(); final SettingsHandler handler = factory.getSettingsHandler(mojo); assertNotNull(handler); assertTrue(handler instanceof SettingsHandlerImpl); }
@Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); }
HandlerFactoryImpl extends HandlerFactory { @Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); } }
HandlerFactoryImpl extends HandlerFactory { @Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); } }
HandlerFactoryImpl extends HandlerFactory { @Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler getSettingsHandler(fi...
HandlerFactoryImpl extends HandlerFactory { @Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler getSettingsHandler(fi...
@Test public void getDefaultArtifactHandler() throws AzureExecutionException { doReturn(project).when(mojo).getProject(); doReturn(DeploymentType.EMPTY).when(mojo).getDeploymentType(); project.setPackaging("jar"); final HandlerFactory factory = new HandlerFactoryImpl(); final ArtifactHandler handler = factory.getArtifa...
@Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: throw new AzureExecutionException(SchemaVersio...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
@Test public void getAutoArtifactHandler() throws AzureExecutionException { doReturn(project).when(mojo).getProject(); doReturn(DeploymentType.AUTO).when(mojo).getDeploymentType(); project.setPackaging("war"); final HandlerFactory factory = new HandlerFactoryImpl(); final ArtifactHandler handler = factory.getArtifactHa...
@Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: throw new AzureExecutionException(SchemaVersio...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo); default: th...
@Test public void getDeploymentSlotHandler() throws AzureExecutionException { final HandlerFactory factory = new HandlerFactoryImpl(); final DeploymentSlotHandler handler = factory.getDeploymentSlotHandler(mojo); assertNotNull(handler); assertTrue(handler instanceof DeploymentSlotHandler); }
@Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); }
HandlerFactoryImpl extends HandlerFactory { @Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); } }
HandlerFactoryImpl extends HandlerFactory { @Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); } }
HandlerFactoryImpl extends HandlerFactory { @Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler getSettingsHa...
HandlerFactoryImpl extends HandlerFactory { @Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler getSettingsHa...
@Test public void getArtifactHandlerFromPackaging() throws Exception { doReturn(project).when(mojo).getProject(); final HandlerFactoryImpl factory = new HandlerFactoryImpl(); assertTrue(factory.getArtifactHandlerBuilderFromPackaging(mojo).build() instanceof JarArtifactHandlerImpl); }
protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DEPLOYMENT_TYPE); } packaging = packaging.toLo...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
@Test(expected = AzureExecutionException.class) public void getArtifactHandlerFromPackagingThrowException() throws AzureExecutionException { doReturn(project).when(mojo).getProject(); project.setPackaging("ear"); final HandlerFactoryImpl factory = new HandlerFactoryImpl(); factory.getArtifactHandlerBuilderFromPackaging...
protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DEPLOYMENT_TYPE); } packaging = packaging.toLo...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionException(UNKNOWN_DE...
@Test public void writeFunctionJsonFile() throws Exception { final PackageMojo mojo = getMojoFromPom(); final PackageMojo mojoSpy = spy(mojo); doReturn("target/azure-functions").when(mojoSpy).getDeploymentStagingDirectoryPath(); doNothing().when(mojoSpy).writeObjectToFile(isNull(), isNull(), isNotNull()); mojoSpy.write...
protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDirectoryPath(), functionName, FUNCTION_JSON).toFile(); write...
PackageMojo extends AbstractFunctionMojo { protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDirectoryPath(), f...
PackageMojo extends AbstractFunctionMojo { protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDirectoryPath(), f...
PackageMojo extends AbstractFunctionMojo { protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDirectoryPath(), f...
PackageMojo extends AbstractFunctionMojo { protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDirectoryPath(), f...
@Test public void getRuntimeStackFromString() { assertEquals(RuntimeStackUtils.getRuntimeStack("jre8", "tomcat 8.5"), RuntimeStack.TOMCAT_8_5_JRE8); assertEquals(RuntimeStackUtils.getRuntimeStack("java11", "TOMCAT 9.0"), RuntimeStack.TOMCAT_9_0_JAVA11); assertEquals(RuntimeStackUtils.getRuntimeStack("java11", null), Ru...
public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return null; }
RuntimeStackUtils { public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return null; } }
RuntimeStackUtils { public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return null; } }
RuntimeStackUtils { public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return null; } static ...
RuntimeStackUtils { public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return null; } static ...
@Test public void getWebContainerFromRuntimeStack() { assertEquals(RuntimeStackUtils.getWebContainerFromRuntimeStack(RuntimeStack.TOMCAT_8_5_JAVA11), "TOMCAT 8.5"); assertEquals(RuntimeStackUtils.getWebContainerFromRuntimeStack(RuntimeStack.JAVA_8_JRE8), "jre8"); assertEquals(RuntimeStackUtils.getWebContainerFromRuntim...
public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; }
RuntimeStackUtils { public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; } }
RuntimeStackUtils { public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; } }
RuntimeStackUtils { public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; } static String getJavaVer...
RuntimeStackUtils { public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; } static String getJavaVer...
@Test public void getOs() throws AzureExecutionException { final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn(runtime).when(mojo).getRuntime(); doReturn(true).when(runtime).isEmpty(); assertEquals(null, parser.getOs()); doReturn(false).when(runtime).isEmpty(); doReturn("windows").when(runtime).getOs();...
@Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toLowerCase(Locale.ENGLISH)) { case "windows": return OperatingSystem...
V2ConfigurationParser extends ConfigurationParser { @Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toLowerCase(Local...
V2ConfigurationParser extends ConfigurationParser { @Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toLowerCase(Local...
V2ConfigurationParser extends ConfigurationParser { @Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toLowerCase(Local...
V2ConfigurationParser extends ConfigurationParser { @Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toLowerCase(Local...
@Test public void getRegion() throws AzureExecutionException { doReturn("unknown-region").when(mojo).getRegion(); try { parser.getRegion(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "The value of <region> is not supported, please correct it in pom.xml."); } doReturn(Region.US_WEST.name()).when(...
@Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); }
V2ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator valida...
V2ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator valida...
V2ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator valida...
@Test public void getRuntimeStack() throws AzureExecutionException { doReturn(null).when(mojo).getRuntime(); assertNull(parser.getRuntimeStack()); final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn(true).when(runtime).isEmpty(); doReturn(runtime).when(mojo).getRuntime(); assertNull(parser.getRuntimeSta...
@Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.getLinuxRuntime(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.getLinuxRuntime(...
V2ConfigurationParser extends ConfigurationParser { @Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.getLinuxRuntime(...
V2ConfigurationParser extends ConfigurationParser { @Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.getLinuxRuntime(...
V2ConfigurationParser extends ConfigurationParser { @Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.getLinuxRuntime(...
@Test public void getImage() throws AzureExecutionException { doReturn(null).when(mojo).getRuntime(); try { parser.getImage(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Please configure the <runtime> in pom.xml."); } final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn("").when(...
@Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator val...
V2ConfigurationParser extends ConfigurationParser { @Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator val...
V2ConfigurationParser extends ConfigurationParser { @Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator val...
@Test public void getServerId() { assertNull(parser.getServerId()); final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn(runtime).when(mojo).getRuntime(); doReturn("serverId").when(runtime).getServerId(); assertEquals("serverId", parser.getServerId()); }
@Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
@Test public void getRegistryUrl() { assertNull(parser.getRegistryUrl()); final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn(runtime).when(mojo).getRuntime(); doReturn("serverId").when(runtime).getRegistryUrl(); assertEquals("serverId", parser.getRegistryUrl()); }
@Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
@Test public void getWebContainer() throws AzureExecutionException { doReturn(null).when(mojo).getRuntime(); try { parser.getWebContainer(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Pleas config the <runtime> in pom.xml."); } final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn...
@Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); } V2ConfigurationParser(AbstractWebAppMojo mojo, Abstrac...
V2ConfigurationParser extends ConfigurationParser { @Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); } V2ConfigurationParser(AbstractWebAppMojo mojo, Abstrac...
V2ConfigurationParser extends ConfigurationParser { @Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); } V2ConfigurationParser(AbstractWebAppMojo mojo, Abstrac...
@Test public void getJavaVersion() throws AzureExecutionException { doReturn(null).when(mojo).getRuntime(); try { parser.getJavaVersion(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Pleas config the <runtime> in pom.xml."); } final RuntimeSetting runtime = mock(RuntimeSetting.class); doReturn(r...
@Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractCon...
V2ConfigurationParser extends ConfigurationParser { @Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractCon...
V2ConfigurationParser extends ConfigurationParser { @Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractCon...
@Test public void testGetSPCredentialsBadParameter() throws Exception { final AuthConfiguration config = new AuthConfiguration(); try { AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(config); fail("Should throw IAE"); } catch (IllegalArgumentException ex) { } try { config.setClient("client_id"); Az...
static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not configured."); } if (StringUtils.isBlank(config.g...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not configured."); ...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not configured."); ...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not configured."); ...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not configured."); ...
@Test public void getResources() { doReturn(null).when(mojo).getDeployment(); assertNull(parser.getResources()); final List<Resource> resources = new ArrayList<Resource>(); resources.add(new Resource()); final Deployment deployment = mock(Deployment.class); doReturn(deployment).when(mojo).getDeployment(); doReturn(reso...
@Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); }
V2ConfigurationParser extends ConfigurationParser { @Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); } }
V2ConfigurationParser extends ConfigurationParser { @Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V2ConfigurationParser extends ConfigurationParser { @Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
@Test public void getWebAppName() throws AzureExecutionException { doReturn("appName").when(mojo).getAppName(); assertEquals("appName", parser.getAppName()); doReturn("-invalidAppName").when(mojo).getAppName(); try { parser.getAppName(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "The <appName> ...
protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); }
ConfigurationParser { protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); } }
ConfigurationParser { protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); }
ConfigurationParser { protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWebAppConfiguration(); }
ConfigurationParser { protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWebAppConfiguration(); }
@Test public void getResourceGroup() throws AzureExecutionException { doReturn("resourceGroupName").when(mojo).getResourceGroup(); assertEquals("resourceGroupName", parser.getResourceGroup()); doReturn("invalid**ResourceGroupName").when(mojo).getResourceGroup(); try { parser.getResourceGroup(); } catch (AzureExecutionE...
protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); }
ConfigurationParser { protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); } }
ConfigurationParser { protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); }
ConfigurationParser { protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWebAppConfigurat...
ConfigurationParser { protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWebAppConfigurat...
@Test public void getWebAppConfiguration() throws AzureExecutionException { final ConfigurationParser parserSpy = spy(parser); doReturn("appName").when(parserSpy).getAppName(); doReturn("resourceGroupName").when(parserSpy).getResourceGroup(); final MavenProject project = mock(MavenProject.class); final MavenResourcesFi...
public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will cause error if creating a new web app.")...
ConfigurationParser { public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will cause error if cre...
ConfigurationParser { public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will cause error if cre...
ConfigurationParser { public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will cause error if cre...
ConfigurationParser { public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will cause error if cre...
@Test public void getOs() throws AzureExecutionException { assertNull(parser.getOs()); doReturn("1.8").when(mojo).getJavaVersion(); assertEquals(OperatingSystemEnum.Windows, parser.getOs()); doReturn(null).when(mojo).getJavaVersion(); doReturn("linuxRuntime").when(mojo).getLinuxRuntime(); assertEquals(OperatingSystemEn...
@Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting = mojo.getContainerSettings(); final boolean isContainerSettingEmp...
V1ConfigurationParser extends ConfigurationParser { @Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting = mojo.getCont...
V1ConfigurationParser extends ConfigurationParser { @Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting = mojo.getCont...
V1ConfigurationParser extends ConfigurationParser { @Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting = mojo.getCont...
V1ConfigurationParser extends ConfigurationParser { @Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting = mojo.getCont...
@Test public void getRegion() throws AzureExecutionException { assertEquals(Region.EUROPE_WEST, parser.getRegion()); doReturn("unknown-region").when(mojo).getRegion(); try { parser.getRegion(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "The value of <region> is not correct, please correct it in...
@Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); }
V1ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); } }
V1ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); } V1ConfigurationParser(AbstractWebAppMojo...
V1ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); } V1ConfigurationParser(AbstractWebAppMojo...
V1ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); } V1ConfigurationParser(AbstractWebAppMojo...
@Test public void getRuntimeStack() throws AzureExecutionException { try { parser.getRuntimeStack(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Please configure the <linuxRuntime> in pom.xml."); } doReturn("tomcat 8.5-jre8").when(mojo).getLinuxRuntime(); assertEquals(RuntimeStack.TOMCAT_8_5_JRE...
@Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(linuxRuntime); if (javaSERuntimeStack != null) { return javaSERuntime...
V1ConfigurationParser extends ConfigurationParser { @Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(linuxRuntime); if...
V1ConfigurationParser extends ConfigurationParser { @Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(linuxRuntime); if...
V1ConfigurationParser extends ConfigurationParser { @Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(linuxRuntime); if...
V1ConfigurationParser extends ConfigurationParser { @Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(linuxRuntime); if...
@Test public void getImage() throws AzureExecutionException { try { parser.getImage(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Please config the <containerSettings> in pom.xml."); } final ContainerSetting containerSetting = mock(ContainerSetting.class); doReturn(containerSetting).when(mojo)....
@Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); }
V1ConfigurationParser extends ConfigurationParser { @Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); } }
V1ConfigurationParser extends ConfigurationParser { @Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); } V1ConfigurationParser(AbstractWebAppMojo mojo, Abs...
V1ConfigurationParser extends ConfigurationParser { @Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); } V1ConfigurationParser(AbstractWebAppMojo mojo, Abs...
V1ConfigurationParser extends ConfigurationParser { @Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); } V1ConfigurationParser(AbstractWebAppMojo mojo, Abs...
@Test public void getServerId() { assertNull(parser.getServerId()); final ContainerSetting containerSetting = mock(ContainerSetting.class); doReturn(containerSetting).when(mojo).getContainerSettings(); doReturn("serverId").when(containerSetting).getServerId(); assertEquals("serverId", parser.getServerId()); }
@Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); }
V1ConfigurationParser extends ConfigurationParser { @Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); } }
V1ConfigurationParser extends ConfigurationParser { @Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationV...
V1ConfigurationParser extends ConfigurationParser { @Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationV...
V1ConfigurationParser extends ConfigurationParser { @Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationV...
@Test public void getRegistryUrl() { assertNull(parser.getRegistryUrl()); final ContainerSetting containerSetting = mock(ContainerSetting.class); doReturn(containerSetting).when(mojo).getContainerSettings(); doReturn("registryUrl").when(containerSetting).getRegistryUrl(); assertEquals("registryUrl", parser.getRegistryU...
@Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); }
V1ConfigurationParser extends ConfigurationParser { @Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); } }
V1ConfigurationParser extends ConfigurationParser { @Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigur...
V1ConfigurationParser extends ConfigurationParser { @Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigur...
V1ConfigurationParser extends ConfigurationParser { @Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigur...
@Test public void testGetSPCredentials() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-cli/sp/azureProfile.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); final AzureTokenCredentials cred =...
static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").getAsJsonObject().get("name").getAsS...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
@Test public void getWebContainer() throws AzureExecutionException { try { parser.getWebContainer(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "The configuration of <javaWebContainer> in pom.xml is not correct."); } doReturn(WebContainer.TOMCAT_8_5_NEWEST).when(mojo).getJavaWebContainer(); asse...
@Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); }
V1ConfigurationParser extends ConfigurationParser { @Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); } }
V1ConfigurationParser extends ConfigurationParser { @Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); }
V1ConfigurationParser extends ConfigurationParser { @Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); @Override Operat...
V1ConfigurationParser extends ConfigurationParser { @Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); @Override Operat...
@Test public void getJavaVersion() throws AzureExecutionException { try { parser.getJavaVersion(); } catch (AzureExecutionException e) { assertEquals(e.getMessage(), "Please config the <javaVersion> in pom.xml."); } doReturn("1.8").when(mojo).getJavaVersion(); assertEquals(JavaVersion.JAVA_8_NEWEST, parser.getJavaVersi...
@Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); }
V1ConfigurationParser extends ConfigurationParser { @Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); } }
V1ConfigurationParser extends ConfigurationParser { @Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); ...
V1ConfigurationParser extends ConfigurationParser { @Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); ...
V1ConfigurationParser extends ConfigurationParser { @Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); ...
@Test public void deployArtifactsWithNoResources() throws Exception { final DeployMojo mojo = getMojoFromPom("/pom-linux.xml"); final DeployMojo mojoSpy = spy(mojo); final WebApp app = mock(WebApp.class); doReturn("target/classes").when(mojoSpy).getDeploymentStagingDirectoryPath(); doReturn(app).when(mojoSpy).getWebApp...
protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployToDeploymentSlot()) { final String slotNa...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
@Test public void deployArtifactsWithResources() throws Exception { final DeployMojo mojo = getMojoFromPom("/pom-linux.xml"); final DeployMojo mojoSpy = spy(mojo); final WebApp app = mock(WebApp.class); doReturn(app).when(mojoSpy).getWebApp(); doReturn(false).when(mojoSpy).isDeployToDeploymentSlot(); doReturn("target/c...
protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployToDeploymentSlot()) { final String slotNa...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
@Test public void deployToDeploymentSlot() throws Exception { final DeployMojo mojo = getMojoFromPom("/pom-slot.xml"); final DeployMojo mojoSpy = spy(mojo); final DeploymentSlot slot = mock(DeploymentSlot.class); final WebApp app = mock(WebApp.class); final DeploymentSlotSetting slotSetting = mock(DeploymentSlotSetting...
protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployToDeploymentSlot()) { final String slotNa...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
DeployMojo extends AbstractWebAppMojo { protected void deployArtifacts(WebAppConfiguration webAppConfiguration) throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException { try { util.beforeDeployArtifacts(); final WebApp app = getWebApp(); final DeployTarget target; if (this.isDeployT...
@Test public void testGetSPCredentialsNoSubscription() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-cli/no-subscription/azureProfile.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); try { A...
static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").getAsJsonObject().get("name").getAsS...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
@Test public void testGetSPCredentialsNoTokens() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-cli/no-tokens/azureProfile.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); try { AzureServiceP...
static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").getAsJsonObject().get("name").getAsS...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
@Test public void testGetCredentialsFromCliNotSP() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-cli/default/azureProfile.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); final AzureTokenCre...
static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").getAsJsonObject().get("name").getAsS...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription.get("user").ge...
@Test public void testNoPluginConfigurationFromBuild() throws Exception { final File pom = new File(this.getClass().getClassLoader().getResource("pom-3.xml").getFile()); final Model model = TestHelper.readMavenModel(pom); final MavenProject project = Mockito.mock(MavenProject.class); Mockito.when(project.getModel()).th...
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 testValidate() { AuthConfiguration auth = new AuthConfiguration(); auth.setClient("client1"); assertTrue(auth.validate().size() == 2); auth.setTenant("tenant1"); assertTrue(auth.validate().size() == 1); auth.setKey("key1"); assertTrue(auth.validate().size() == 0); auth.setCertificate("certificate1"); ...
public List<ConfigurationProblem> validate() { final List<ConfigurationProblem> results = new ArrayList<>(); final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? "server: " + serverId + " in settings.xml." : "<auth> configuration."; if (StringUtils.isBlank(tenant)) { results.add(new ConfigurationProble...
AuthConfiguration { public List<ConfigurationProblem> validate() { final List<ConfigurationProblem> results = new ArrayList<>(); final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? "server: " + serverId + " in settings.xml." : "<auth> configuration."; if (StringUtils.isBlank(tenant)) { results.add(new...
AuthConfiguration { public List<ConfigurationProblem> validate() { final List<ConfigurationProblem> results = new ArrayList<>(); final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? "server: " + serverId + " in settings.xml." : "<auth> configuration."; if (StringUtils.isBlank(tenant)) { results.add(new...
AuthConfiguration { public List<ConfigurationProblem> validate() { final List<ConfigurationProblem> results = new ArrayList<>(); final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? "server: " + serverId + " in settings.xml." : "<auth> configuration."; if (StringUtils.isBlank(tenant)) { results.add(new...
AuthConfiguration { public List<ConfigurationProblem> validate() { final List<ConfigurationProblem> results = new ArrayList<>(); final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? "server: " + serverId + " in settings.xml." : "<auth> configuration."; if (StringUtils.isBlank(tenant)) { results.add(new...
@Test public void testSetClient() { final AuthConfiguration auth = new AuthConfiguration(); auth.setClient("client1"); assertEquals("client1", auth.getClient()); }
public void setClient(String client) { this.client = client; }
AuthConfiguration { public void setClient(String client) { this.client = client; } }
AuthConfiguration { public void setClient(String client) { this.client = client; } }
AuthConfiguration { public void setClient(String client) { this.client = client; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassw...
AuthConfiguration { public void setClient(String client) { this.client = client; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassw...
@Test public void testSetTenant() { final AuthConfiguration auth = new AuthConfiguration(); auth.setTenant("tenant1"); assertEquals("tenant1", auth.getTenant()); }
public void setTenant(String tenant) { this.tenant = tenant; }
AuthConfiguration { public void setTenant(String tenant) { this.tenant = tenant; } }
AuthConfiguration { public void setTenant(String tenant) { this.tenant = tenant; } }
AuthConfiguration { public void setTenant(String tenant) { this.tenant = tenant; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassw...
AuthConfiguration { public void setTenant(String tenant) { this.tenant = tenant; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassw...
@Test public void testSetKey() { final AuthConfiguration auth = new AuthConfiguration(); auth.setKey("key1"); assertEquals("key1", auth.getKey()); }
public void setKey(String key) { this.key = key; }
AuthConfiguration { public void setKey(String key) { this.key = key; } }
AuthConfiguration { public void setKey(String key) { this.key = key; } }
AuthConfiguration { public void setKey(String key) { this.key = key; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassword(); void ...
AuthConfiguration { public void setKey(String key) { this.key = key; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePassword(); void ...
@Test public void testSetCertificate() { final AuthConfiguration auth = new AuthConfiguration(); auth.setCertificate("certificate1"); assertEquals("certificate1", auth.getCertificate()); }
public void setCertificate(String certificate) { this.certificate = certificate; }
AuthConfiguration { public void setCertificate(String certificate) { this.certificate = certificate; } }
AuthConfiguration { public void setCertificate(String certificate) { this.certificate = certificate; } }
AuthConfiguration { public void setCertificate(String certificate) { this.certificate = certificate; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String...
AuthConfiguration { public void setCertificate(String certificate) { this.certificate = certificate; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String...
@Test public void testSetCertificatePassword() { final AuthConfiguration auth = new AuthConfiguration(); auth.setCertificatePassword("certificatePassword1"); assertEquals("certificatePassword1", auth.getCertificatePassword()); }
public void setCertificatePassword(String certificatePassword) { this.certificatePassword = certificatePassword; }
AuthConfiguration { public void setCertificatePassword(String certificatePassword) { this.certificatePassword = certificatePassword; } }
AuthConfiguration { public void setCertificatePassword(String certificatePassword) { this.certificatePassword = certificatePassword; } }
AuthConfiguration { public void setCertificatePassword(String certificatePassword) { this.certificatePassword = certificatePassword; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertifi...
AuthConfiguration { public void setCertificatePassword(String certificatePassword) { this.certificatePassword = certificatePassword; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertifi...
@Test public void testSetEnvironment() { final AuthConfiguration auth = new AuthConfiguration(); auth.setEnvironment("environment1"); assertEquals("environment1", auth.getEnvironment()); }
public void setEnvironment(String environment) { this.environment = environment; }
AuthConfiguration { public void setEnvironment(String environment) { this.environment = environment; } }
AuthConfiguration { public void setEnvironment(String environment) { this.environment = environment; } }
AuthConfiguration { public void setEnvironment(String environment) { this.environment = environment; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String...
AuthConfiguration { public void setEnvironment(String environment) { this.environment = environment; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String...
@Test public void testSetServerId() { final AuthConfiguration auth = new AuthConfiguration(); auth.setServerId("serverId1"); assertEquals("serverId1", auth.getServerId()); }
public void setServerId(String serverId) { this.serverId = serverId; }
AuthConfiguration { public void setServerId(String serverId) { this.serverId = serverId; } }
AuthConfiguration { public void setServerId(String serverId) { this.serverId = serverId; } }
AuthConfiguration { public void setServerId(String serverId) { this.serverId = serverId; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertific...
AuthConfiguration { public void setServerId(String serverId) { this.serverId = serverId; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertific...
@Test public void testSetHttpProxyHost() { final AuthConfiguration auth = new AuthConfiguration(); auth.setHttpProxyHost("httpProxyHost1"); assertEquals("httpProxyHost1", auth.getHttpProxyHost()); }
public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; }
AuthConfiguration { public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; } }
AuthConfiguration { public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; } }
AuthConfiguration { public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate)...
AuthConfiguration { public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate)...
@Test public void testSetHttpProxyPort() { final AuthConfiguration auth = new AuthConfiguration(); auth.setHttpProxyPort("8080"); assertEquals("8080", auth.getHttpProxyPort()); }
public void setHttpProxyPort(String httpProxyPort) { this.httpProxyPort = httpProxyPort; }
AuthConfiguration { public void setHttpProxyPort(String httpProxyPort) { this.httpProxyPort = httpProxyPort; } }
AuthConfiguration { public void setHttpProxyPort(String httpProxyPort) { this.httpProxyPort = httpProxyPort; } }
AuthConfiguration { public void setHttpProxyPort(String httpProxyPort) { this.httpProxyPort = httpProxyPort; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate)...
AuthConfiguration { public void setHttpProxyPort(String httpProxyPort) { this.httpProxyPort = httpProxyPort; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate)...
@Test public void doExecute() throws Exception { PowerMockito.doNothing().when(Log.class); Log.info(any(String.class)); final PrintStream out = mock(PrintStream.class); System.setOut(out); final ListMojo mojo = new ListMojo(); mojo.doExecute(); verify(out, atLeastOnce()).write(any(byte[].class), any(int.class), any(int...
@Override protected void doExecute() throws AzureExecutionException { try { Log.info(TEMPLATES_START); printToSystemOut(TEMPLATES_FILE); Log.info(TEMPLATES_END); Log.info(BINDINGS_START); printToSystemOut(BINDINGS_FILE); Log.info(BINDINGS_END); Log.info(RESOURCES_START); printToSystemOut(RESOURCES_FILE); Log.info(RESOU...
ListMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { Log.info(TEMPLATES_START); printToSystemOut(TEMPLATES_FILE); Log.info(TEMPLATES_END); Log.info(BINDINGS_START); printToSystemOut(BINDINGS_FILE); Log.info(BINDINGS_END); Log.info(RESOURCES_START); printToS...
ListMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { Log.info(TEMPLATES_START); printToSystemOut(TEMPLATES_FILE); Log.info(TEMPLATES_END); Log.info(BINDINGS_START); printToSystemOut(BINDINGS_FILE); Log.info(BINDINGS_END); Log.info(RESOURCES_START); printToS...
ListMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { Log.info(TEMPLATES_START); printToSystemOut(TEMPLATES_FILE); Log.info(TEMPLATES_END); Log.info(BINDINGS_START); printToSystemOut(BINDINGS_FILE); Log.info(BINDINGS_END); Log.info(RESOURCES_START); printToS...
ListMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { Log.info(TEMPLATES_START); printToSystemOut(TEMPLATES_FILE); Log.info(TEMPLATES_END); Log.info(BINDINGS_START); printToSystemOut(BINDINGS_FILE); Log.info(BINDINGS_END); Log.info(RESOURCES_START); printToS...
@Test public void testGetAuthConfigurationFromServer() throws Exception { final DefaultPlexusCipher cipher = new DefaultPlexusCipher(); final String encryptedKey = cipher.encryptAndDecorate("hello", "fake_master_key"); final String xml = "<configuration>\n" + " <client>df4d03fa-135b-4b7b-932d-2f2ba6449792</client>\n" +...
public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final Server server = sess...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
@Test public void testBadServerId() throws Exception { final Server server = Mockito.mock(Server.class); final Settings mavenSettings = Mockito.mock(Settings.class); Mockito.when(mavenSettings.getServer("test1")).thenReturn(server); final MavenSession mavenSession = Mockito.mock(MavenSession.class); Mockito.when(mavenS...
public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final Server server = sess...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
MavenSettingHelper { public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId) throws MavenDecryptException { if (StringUtils.isBlank(serverId)) { throw new IllegalArgumentException("Parameter 'serverId' cannot be null or empty."); } final...
@Test public void testStart() throws IOException { localAuthServer.stop(); try { localAuthServer.start(); } catch (Exception ex) { fail("Should not fail on after start."); } }
public void start() throws IOException { if (jettyServer.isStarted()) { return; } try { jettyServer.start(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } }
LocalAuthServer { public void start() throws IOException { if (jettyServer.isStarted()) { return; } try { jettyServer.start(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } }
LocalAuthServer { public void start() throws IOException { if (jettyServer.isStarted()) { return; } try { jettyServer.start(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); }
LocalAuthServer { public void start() throws IOException { if (jettyServer.isStarted()) { return; } try { jettyServer.start(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); URI getURI(); void start(); void stop(); String waitF...
LocalAuthServer { public void start() throws IOException { if (jettyServer.isStarted()) { return; } try { jettyServer.start(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); URI getURI(); void start(); void stop(); String waitF...
@Test public void testStop() throws IOException { localAuthServer.stop(); localAuthServer.stop(); }
public void stop() throws IOException { semaphore.release(); try { jettyServer.stop(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } }
LocalAuthServer { public void stop() throws IOException { semaphore.release(); try { jettyServer.stop(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } }
LocalAuthServer { public void stop() throws IOException { semaphore.release(); try { jettyServer.stop(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); }
LocalAuthServer { public void stop() throws IOException { semaphore.release(); try { jettyServer.stop(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); URI getURI(); void start(); void stop(); String waitForCode(); }
LocalAuthServer { public void stop() throws IOException { semaphore.release(); try { jettyServer.stop(); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IOException(e); } } LocalAuthServer(); URI getURI(); void start(); void stop(); String waitForCode(); }
@Test public void testFromNullResult() { try { AzureCredential.fromAuthenticationResult(null); fail("Should throw IAE"); } catch (IllegalArgumentException ex) { } }
public static AzureCredential fromAuthenticationResult(AuthenticationResult result) { if (result == null) { throw new IllegalArgumentException("Parameter \"result\" cannot be null"); } final AzureCredential token = new AzureCredential(); token.setAccessTokenType(result.getAccessTokenType()); token.setAccessToken(result...
AzureCredential { public static AzureCredential fromAuthenticationResult(AuthenticationResult result) { if (result == null) { throw new IllegalArgumentException("Parameter \"result\" cannot be null"); } final AzureCredential token = new AzureCredential(); token.setAccessTokenType(result.getAccessTokenType()); token.set...
AzureCredential { public static AzureCredential fromAuthenticationResult(AuthenticationResult result) { if (result == null) { throw new IllegalArgumentException("Parameter \"result\" cannot be null"); } final AzureCredential token = new AzureCredential(); token.setAccessTokenType(result.getAccessTokenType()); token.set...
AzureCredential { public static AzureCredential fromAuthenticationResult(AuthenticationResult result) { if (result == null) { throw new IllegalArgumentException("Parameter \"result\" cannot be null"); } final AzureCredential token = new AzureCredential(); token.setAccessTokenType(result.getAccessTokenType()); token.set...
AzureCredential { public static AzureCredential fromAuthenticationResult(AuthenticationResult result) { if (result == null) { throw new IllegalArgumentException("Parameter \"result\" cannot be null"); } final AzureCredential token = new AzureCredential(); token.setAccessTokenType(result.getAccessTokenType()); token.set...
@Test public void testExecute() throws Exception { AzureContextExecutor executor = new AzureContextExecutor(AzureLoginHelper.baseURL(AzureEnvironment.AZURE), t -> null); assertNull(executor.execute()); final AuthenticationResult result = TestHelper.createAuthenticationResult(); executor = new AzureContextExecutor(Azure...
public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException { final ExecutorService executorService = Executors.newSingleThreadExecutor(); try { final AuthenticationContext authenticationContext = new AuthenticationContext(baseUrl, true, executorSe...
AzureContextExecutor { public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException { final ExecutorService executorService = Executors.newSingleThreadExecutor(); try { final AuthenticationContext authenticationContext = new AuthenticationContext(ba...
AzureContextExecutor { public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException { final ExecutorService executorService = Executors.newSingleThreadExecutor(); try { final AuthenticationContext authenticationContext = new AuthenticationContext(ba...
AzureContextExecutor { public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException { final ExecutorService executorService = Executors.newSingleThreadExecutor(); try { final AuthenticationContext authenticationContext = new AuthenticationContext(ba...
AzureContextExecutor { public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException { final ExecutorService executorService = Executors.newSingleThreadExecutor(); try { final AuthenticationContext authenticationContext = new AuthenticationContext(ba...
@Test public void testOauthWithBrowser() throws Exception { PowerMockito.mockStatic(Desktop.class); final URI uri = new URI("http: final Desktop mockDesktop = mock(Desktop.class); PowerMockito.doNothing().when(mockDesktop).browse(uri); PowerMockito.when(mockDesktop.isSupported(Desktop.Action.BROWSE)).thenReturn(true); ...
static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("Not able to launch ...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
@Test public void testOAuthLoginNoBrowser() throws Exception { PowerMockito.mockStatic(Desktop.class); PowerMockito.when(Desktop.isDesktopSupported()).thenReturn(false); try { AzureLoginHelper.oAuthLogin(AzureEnvironment.AZURE); fail("Should report desktop not supported."); } catch (DesktopNotSupportedException e) { } ...
static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("Not able to launch ...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
AzureLoginHelper { static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException { if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { throw new DesktopNotSupportedException("...
@Test public void testDeviceLogin() throws Exception { final AuthenticationResult authenticationResult = TestHelper.createAuthenticationResult(); final AuthenticationContext ctx = mock(AuthenticationContext.class); final AzureEnvironment env = AzureEnvironment.AZURE; final Future future = mock(Future.class); final Devi...
static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { final String currentLogLevelFieldName = "currentLogLevel"; Object logger = null; Object oldLevelValue = null; try { try { logger = LoggerFactory.getLogger(Authent...
AzureLoginHelper { static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { final String currentLogLevelFieldName = "currentLogLevel"; Object logger = null; Object oldLevelValue = null; try { try { logger = LoggerFactor...
AzureLoginHelper { static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { final String currentLogLevelFieldName = "currentLogLevel"; Object logger = null; Object oldLevelValue = null; try { try { logger = LoggerFactor...
AzureLoginHelper { static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { final String currentLogLevelFieldName = "currentLogLevel"; Object logger = null; Object oldLevelValue = null; try { try { logger = LoggerFactor...
AzureLoginHelper { static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { final String currentLogLevelFieldName = "currentLogLevel"; Object logger = null; Object oldLevelValue = null; try { try { logger = LoggerFactor...
@Test public void testRefreshToken() throws Exception { final AuthenticationResult authenticationResult = TestHelper.createAuthenticationResult(); final AuthenticationContext ctx = mock(AuthenticationContext.class); final AzureEnvironment env = AzureEnvironment.AZURE; final Future future = mock(Future.class); whenNew(A...
static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(refreshToken)) { throw new IllegalArgumentException(...
AzureLoginHelper { static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(refreshToken)) { throw new Illega...
AzureLoginHelper { static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(refreshToken)) { throw new Illega...
AzureLoginHelper { static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(refreshToken)) { throw new Illega...
AzureLoginHelper { static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(refreshToken)) { throw new Illega...
@Test public void doExecute() throws Exception { final AddMojo mojo = getMojoFromPom(); final Settings settings = new Settings(); settings.setInteractiveMode(false); ReflectionUtils.setVariableValueInObject(mojo, "basedir", new File("target/test")); ReflectionUtils.setVariableValueInObject(mojo, "settings", settings); ...
@Override protected void doExecute() throws AzureExecutionException { try { final List<FunctionTemplate> templates = loadAllFunctionTemplates(); final FunctionTemplate template = getFunctionTemplate(templates); final BindingTemplate bindingTemplate = FunctionUtils.loadBindingTemplate(template.getTriggerType()); final M...
AddMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { final List<FunctionTemplate> templates = loadAllFunctionTemplates(); final FunctionTemplate template = getFunctionTemplate(templates); final BindingTemplate bindingTemplate = FunctionUtils.loadBindingTempl...
AddMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { final List<FunctionTemplate> templates = loadAllFunctionTemplates(); final FunctionTemplate template = getFunctionTemplate(templates); final BindingTemplate bindingTemplate = FunctionUtils.loadBindingTempl...
AddMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { final List<FunctionTemplate> templates = loadAllFunctionTemplates(); final FunctionTemplate template = getFunctionTemplate(templates); final BindingTemplate bindingTemplate = FunctionUtils.loadBindingTempl...
AddMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { try { final List<FunctionTemplate> templates = loadAllFunctionTemplates(); final FunctionTemplate template = getFunctionTemplate(templates); final BindingTemplate bindingTemplate = FunctionUtils.loadBindingTempl...
@Test public void testAuthorizationUrl() throws Exception { String url = AzureLoginHelper.authorizationUrl(AzureEnvironment.AZURE, "http: Map<String, String> queryMap = splitQuery(url); assertEquals(Constants.CLIENT_ID, queryMap.get("client_id")); assertEquals("http: assertEquals("code", queryMap.get("response_type"));...
static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter 'redirectUrl' cann...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
@Test public void tesAuthorizationUrlInvalidParameter() throws Exception { try { AzureLoginHelper.authorizationUrl(null, "http: fail("Should throw IAE when env is null."); } catch (IllegalArgumentException e) { } try { AzureLoginHelper.authorizationUrl(AzureEnvironment.AZURE_CHINA, ""); fail("Should throw IAE when redi...
static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter 'redirectUrl' cann...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
AzureLoginHelper { static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException { if (env == null) { throw new IllegalArgumentException("Parameter 'env' cannot be null."); } if (StringUtils.isBlank(redirectUrl)) { throw new IllegalArgumentException("Parameter...
@Test public void testBaseURL() { String baseUrl = AzureLoginHelper.baseURL(AzureEnvironment.AZURE); assertEquals("https: baseUrl = AzureLoginHelper.baseURL(AzureEnvironment.AZURE_US_GOVERNMENT); assertEquals("https: }
static String baseURL(AzureEnvironment env) { return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT; }
AzureLoginHelper { static String baseURL(AzureEnvironment env) { return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT; } }
AzureLoginHelper { static String baseURL(AzureEnvironment env) { return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT; } private AzureLoginHelper(); }
AzureLoginHelper { static String baseURL(AzureEnvironment env) { return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT; } private AzureLoginHelper(); }
AzureLoginHelper { static String baseURL(AzureEnvironment env) { return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT; } private AzureLoginHelper(); }
@Test public void testAzureEnvironmentShortName() { assertEquals("azure", AzureLoginHelper.getShortNameForAzureEnvironment(AzureEnvironment.AZURE)); assertEquals("azure_china", AzureLoginHelper.getShortNameForAzureEnvironment(AzureEnvironment.AZURE_CHINA)); assertEquals("azure_us_government", AzureLoginHelper.getShortN...
static String getShortNameForAzureEnvironment(AzureEnvironment env) { return AZURE_ENVIRONMENT_MAP.get(env); }
AzureLoginHelper { static String getShortNameForAzureEnvironment(AzureEnvironment env) { return AZURE_ENVIRONMENT_MAP.get(env); } }
AzureLoginHelper { static String getShortNameForAzureEnvironment(AzureEnvironment env) { return AZURE_ENVIRONMENT_MAP.get(env); } private AzureLoginHelper(); }
AzureLoginHelper { static String getShortNameForAzureEnvironment(AzureEnvironment env) { return AZURE_ENVIRONMENT_MAP.get(env); } private AzureLoginHelper(); }
AzureLoginHelper { static String getShortNameForAzureEnvironment(AzureEnvironment env) { return AZURE_ENVIRONMENT_MAP.get(env); } private AzureLoginHelper(); }
@Test public void testOAuthLogin() throws Exception { final AzureEnvironment env = AzureEnvironment.AZURE; final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult()); mockStatic(AzureLoginHelper.class); when(AzureLoginHelper.oAuthLogin(env)).thenReturn(credExp...
public static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException { return AzureLoginHelper.oAuthLogin(env); }
AzureAuthHelper { public static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException { return AzureLoginHelper.oAuthLogin(env); } }
AzureAuthHelper { public static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException { return AzureLoginHelper.oAuthLogin(env); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException { return AzureLoginHelper.oAuthLogin(env); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); sta...
AzureAuthHelper { public static AzureCredential oAuthLogin(AzureEnvironment env) throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException { return AzureLoginHelper.oAuthLogin(env); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); sta...
@Test public void testDeviceLogin() throws Exception { final AzureEnvironment env = AzureEnvironment.AZURE; final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult()); mockStatic(AzureLoginHelper.class); when(AzureLoginHelper.deviceLogin(env)).thenReturn(credE...
public static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.deviceLogin(env); }
AzureAuthHelper { public static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.deviceLogin(env); } }
AzureAuthHelper { public static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.deviceLogin(env); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.deviceLogin(env); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static A...
AzureAuthHelper { public static AzureCredential deviceLogin(AzureEnvironment env) throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.deviceLogin(env); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static A...
@Test public void testRefreshToken() throws Exception { final AzureEnvironment env = AzureEnvironment.AZURE; final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult()); mockStatic(AzureLoginHelper.class); when(AzureLoginHelper.refreshToken(env, "token for powe...
public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
@Test public void testRefreshTokenInvalidToken() throws Exception { try { AzureAuthHelper.refreshToken(AzureEnvironment.AZURE, "invalid"); fail("Should throw AzureLoginFailureException when refreshToken is invalid."); } catch (ExecutionException e) { } }
public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
@Test public void testRefreshTokenInvalidParameter() throws Exception { try { AzureAuthHelper.refreshToken(null, "abc"); fail("Should throw IAE when env is null."); } catch (IllegalArgumentException e) { } try { AzureAuthHelper.refreshToken(AzureEnvironment.AZURE_CHINA, ""); fail("Should throw IAE when refreshToken is ...
public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
AzureAuthHelper { public static AzureCredential refreshToken(AzureEnvironment env, String refreshToken) throws MalformedURLException, InterruptedException, ExecutionException { return AzureLoginHelper.refreshToken(env, refreshToken); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env);...
@Test public void testGetAzureEnvironment() { assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvironment(null)); assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvironment(" ")); assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvironment("azure")); assertEquals(AzureEnvironment...
public static AzureEnvironment getAzureEnvironment(String environment) { if (StringUtils.isEmpty(environment)) { return AzureEnvironment.AZURE; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": return AzureEnvironment.AZURE_CHINA; case "AZURE_GERMANY": case "AZUREGERMANCLO...
AzureAuthHelper { public static AzureEnvironment getAzureEnvironment(String environment) { if (StringUtils.isEmpty(environment)) { return AzureEnvironment.AZURE; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": return AzureEnvironment.AZURE_CHINA; case "AZURE_GERMANY": ca...
AzureAuthHelper { public static AzureEnvironment getAzureEnvironment(String environment) { if (StringUtils.isEmpty(environment)) { return AzureEnvironment.AZURE; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": return AzureEnvironment.AZURE_CHINA; case "AZURE_GERMANY": ca...
AzureAuthHelper { public static AzureEnvironment getAzureEnvironment(String environment) { if (StringUtils.isEmpty(environment)) { return AzureEnvironment.AZURE; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": return AzureEnvironment.AZURE_CHINA; case "AZURE_GERMANY": ca...
AzureAuthHelper { public static AzureEnvironment getAzureEnvironment(String environment) { if (StringUtils.isEmpty(environment)) { return AzureEnvironment.AZURE; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": return AzureEnvironment.AZURE_CHINA; case "AZURE_GERMANY": ca...
@Test public void assureInputFromUser() throws Exception { final AddMojo mojo = getMojoFromPom(); final AddMojo mojoSpy = spy(mojo); final Scanner scanner = mock(Scanner.class); doReturn("2").when(scanner).nextLine(); doReturn(scanner).when(mojoSpy).getScanner(); final Set<String> set = new HashSet<>(); mojoSpy.assureI...
protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options, final Consumer<String> setter) { final String option = findElementInOptions(options, initValue); if (option != null) { Log.info(FOUND_VALID_VALUE); setter.accept(option); return; } out.printf("Choose from below o...
AddMojo extends AbstractFunctionMojo { protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options, final Consumer<String> setter) { final String option = findElementInOptions(options, initValue); if (option != null) { Log.info(FOUND_VALID_VALUE); setter.accept(option); re...
AddMojo extends AbstractFunctionMojo { protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options, final Consumer<String> setter) { final String option = findElementInOptions(options, initValue); if (option != null) { Log.info(FOUND_VALID_VALUE); setter.accept(option); re...
AddMojo extends AbstractFunctionMojo { protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options, final Consumer<String> setter) { final String option = findElementInOptions(options, initValue); if (option != null) { Log.info(FOUND_VALID_VALUE); setter.accept(option); re...
AddMojo extends AbstractFunctionMojo { protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options, final Consumer<String> setter) { final String option = findElementInOptions(options, initValue); if (option != null) { Log.info(FOUND_VALID_VALUE); setter.accept(option); re...
@Test public void testEnvironmentValidation() { assertTrue(AzureAuthHelper.validateEnvironment(null)); assertTrue(AzureAuthHelper.validateEnvironment("")); assertTrue(AzureAuthHelper.validateEnvironment(" ")); assertTrue(AzureAuthHelper.validateEnvironment("azure")); assertFalse(AzureAuthHelper.validateEnvironment("azu...
public static boolean validateEnvironment(String environment) { if (StringUtils.isBlank(environment)) { return true; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": case "AZURE_GERMANY": case "AZUREGERMANCLOUD": case "AZURE_US_GOVERNMENT": case "AZUREUSGOVERNMENT": case ...
AzureAuthHelper { public static boolean validateEnvironment(String environment) { if (StringUtils.isBlank(environment)) { return true; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": case "AZURE_GERMANY": case "AZUREGERMANCLOUD": case "AZURE_US_GOVERNMENT": case "AZUREUS...
AzureAuthHelper { public static boolean validateEnvironment(String environment) { if (StringUtils.isBlank(environment)) { return true; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": case "AZURE_GERMANY": case "AZUREGERMANCLOUD": case "AZURE_US_GOVERNMENT": case "AZUREUS...
AzureAuthHelper { public static boolean validateEnvironment(String environment) { if (StringUtils.isBlank(environment)) { return true; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": case "AZURE_GERMANY": case "AZUREGERMANCLOUD": case "AZURE_US_GOVERNMENT": case "AZUREUS...
AzureAuthHelper { public static boolean validateEnvironment(String environment) { if (StringUtils.isBlank(environment)) { return true; } switch (environment.toUpperCase(Locale.ENGLISH)) { case "AZURE_CHINA": case "AZURECHINACLOUD": case "AZURE_GERMANY": case "AZUREGERMANCLOUD": case "AZURE_US_GOVERNMENT": case "AZUREUS...
@Test public void testGetAzureSecretFile() { TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, null); final File azureSecretFile = AzureAuthHelper.getAzureSecretFile(); assertEquals(Paths.get(System.getProperty("user.home"), ".azure", "azure-secret.json").toString(), azureSecretFile.getAbsolutePath()); T...
public static File getAzureSecretFile() { return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE); }
AzureAuthHelper { public static File getAzureSecretFile() { return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE); } }
AzureAuthHelper { public static File getAzureSecretFile() { return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE); } private AzureAuthHelper(); }
AzureAuthHelper { public static File getAzureSecretFile() { return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshToken(AzureEnvi...
AzureAuthHelper { public static File getAzureSecretFile() { return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshToken(AzureEnvi...
@Test public void testGetAzureConfigFolder() { TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, null); final File azureConfigFolder = AzureAuthHelper.getAzureConfigFolder(); assertEquals(Paths.get(System.getProperty("user.home"), ".azure").toString(), azureConfigFolder.getAbsolutePath()); TestHelper.inj...
public static File getAzureConfigFolder() { return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) : Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile(); }
AzureAuthHelper { public static File getAzureConfigFolder() { return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) : Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile(); } }
AzureAuthHelper { public static File getAzureConfigFolder() { return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) : Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile(); } private AzureAuthHelper(); }
AzureAuthHelper { public static File getAzureConfigFolder() { return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) : Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile(); } private AzureAuthHelper(); static AzureCr...
AzureAuthHelper { public static File getAzureConfigFolder() { return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) : Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile(); } private AzureAuthHelper(); static AzureCr...
@Test public void testExistsAzureSecretFile() { final File testConfigDir = new File(this.getClass().getResource("/azure-login/azure-secret.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); assertTrue(AzureAuthHelper.existsAzureSecretFil...
public static boolean existsAzureSecretFile() { final File azureSecretFile = getAzureSecretFile(); return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0; }
AzureAuthHelper { public static boolean existsAzureSecretFile() { final File azureSecretFile = getAzureSecretFile(); return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0; } }
AzureAuthHelper { public static boolean existsAzureSecretFile() { final File azureSecretFile = getAzureSecretFile(); return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0; } private AzureAuthHelper(); }
AzureAuthHelper { public static boolean existsAzureSecretFile() { final File azureSecretFile = getAzureSecretFile(); return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0; } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential ...
AzureAuthHelper { public static boolean existsAzureSecretFile() { final File azureSecretFile = getAzureSecretFile(); return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0; } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential ...
@Test public void testReadAzureCredentials() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-login/azure-secret.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); assertTrue(AzureAuthHelper.exis...
public static AzureCredential readAzureCredentials() throws IOException { return readAzureCredentials(getAzureSecretFile()); }
AzureAuthHelper { public static AzureCredential readAzureCredentials() throws IOException { return readAzureCredentials(getAzureSecretFile()); } }
AzureAuthHelper { public static AzureCredential readAzureCredentials() throws IOException { return readAzureCredentials(getAzureSecretFile()); } private AzureAuthHelper(); }
AzureAuthHelper { public static AzureCredential readAzureCredentials() throws IOException { return readAzureCredentials(getAzureSecretFile()); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshTo...
AzureAuthHelper { public static AzureCredential readAzureCredentials() throws IOException { return readAzureCredentials(getAzureSecretFile()); } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshTo...
@Test public void testWriteAzureCredentials() throws Exception { final File testConfigDir = new File(this.getClass().getResource("/azure-login/azure-secret.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); assertTrue(AzureAuthHelper.exi...
public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStringToFile(file, Jso...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
@Test public void testWriteAzureCredentialsBadParameter() throws Exception { final File tempFile = File.createTempFile("azure-auth-helper-test", ".json"); try { AzureAuthHelper.writeAzureCredentials(null, tempFile); fail("Should throw IAE here."); } catch (IllegalArgumentException ex) { } try { AzureAuthHelper.writeAzu...
public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStringToFile(file, Jso...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
AzureAuthHelper { public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException { if (cred == null) { throw new IllegalArgumentException("Parameter 'cred' cannot be null."); } if (file == null) { throw new IllegalArgumentException("Parameter 'file' cannot be null."); } FileUtils.writeStri...
@Test public void testIsInCloudShell() { TestHelper.injectEnvironmentVariable(Constants.CLOUD_SHELL_ENV_KEY, "azure"); assertTrue(AzureAuthHelper.isInCloudShell()); TestHelper.injectEnvironmentVariable(Constants.CLOUD_SHELL_ENV_KEY, null); assertFalse(AzureAuthHelper.isInCloudShell()); }
static boolean isInCloudShell() { return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null; }
AzureAuthHelper { static boolean isInCloudShell() { return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null; } }
AzureAuthHelper { static boolean isInCloudShell() { return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null; } private AzureAuthHelper(); }
AzureAuthHelper { static boolean isInCloudShell() { return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null; } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshToken(AzureEnvironment env, Stri...
AzureAuthHelper { static boolean isInCloudShell() { return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null; } private AzureAuthHelper(); static AzureCredential oAuthLogin(AzureEnvironment env); static AzureCredential deviceLogin(AzureEnvironment env); static AzureCredential refreshToken(AzureEnvironment env, Stri...
@Test public void testGetAzureTokenCredentials() throws Exception { File testConfigDir = new File(this.getClass().getResource("/azure-login/azure-secret.json").getFile()).getParentFile(); TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath()); AzureTokenCredentials cred = Azur...
public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(configuration)); } if ...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
@Test public void testGetAzureTokenCredentialsFromConfiguration() throws Exception { final AuthConfiguration auth = new AuthConfiguration(); auth.setClient("client_id"); auth.setTenant("tenant_id"); auth.setKey("key"); auth.setEnvironment("azure_germany"); final AzureTokenCredentials cred = AzureAuthHelper.getAzureToke...
public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(configuration)); } if ...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
AzureAuthHelper { public static AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration) throws InvalidConfigurationException, IOException { if (configuration != null) { return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL, AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(conf...
@Test(expected = MojoFailureException.class) public void assureInputInBatchModeWhenRequired() throws Exception { final AddMojo mojo = getMojoFromPom(); final AddMojo mojoSpy = spy(mojo); final Set<String> set = new HashSet<>(); mojoSpy.assureInputInBatchMode("", StringUtils::isNotEmpty, set::add, true); }
protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (required) { throw new MojoFailureExcept...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
@Test public void testWithPath() { final Volume volume = new Volume(); volume.withPath("/home/shared"); assertEquals("/home/shared", volume.getPath()); }
public Volume withPath(String path) { this.path = path; return this; }
Volume { public Volume withPath(String path) { this.path = path; return this; } }
Volume { public Volume withPath(String path) { this.path = path; return this; } }
Volume { public Volume withPath(String path) { this.path = path; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
Volume { public Volume withPath(String path) { this.path = path; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
@Test public void testWithSize() { final Volume volume = new Volume(); volume.withSize("10G"); assertEquals("10G", volume.getSize()); }
public Volume withSize(String size) { this.size = size; return this; }
Volume { public Volume withSize(String size) { this.size = size; return this; } }
Volume { public Volume withSize(String size) { this.size = size; return this; } }
Volume { public Volume withSize(String size) { this.size = size; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
Volume { public Volume withSize(String size) { this.size = size; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
@Test public void testWithPersist() { final Volume volume = new Volume(); volume.withPersist(true); assertEquals(Boolean.TRUE, volume.isPersist()); }
public Volume withPersist(Boolean persist) { this.persist = persist; return this; }
Volume { public Volume withPersist(Boolean persist) { this.persist = persist; return this; } }
Volume { public Volume withPersist(Boolean persist) { this.persist = persist; return this; } }
Volume { public Volume withPersist(Boolean persist) { this.persist = persist; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
Volume { public Volume withPersist(Boolean persist) { this.persist = persist; return this; } String getPath(); String getSize(); Boolean isPersist(); Volume withPath(String path); Volume withSize(String size); Volume withPersist(Boolean persist); }
@Test public void testSetCpu() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setCpu("1"); assertEquals("1", deploy.getCpu()); }
public void setCpu(String cpu) { this.cpu = cpu; }
DeploymentSettings extends BaseSettings { public void setCpu(String cpu) { this.cpu = cpu; } }
DeploymentSettings extends BaseSettings { public void setCpu(String cpu) { this.cpu = cpu; } }
DeploymentSettings extends BaseSettings { public void setCpu(String cpu) { this.cpu = cpu; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceCount); void setJvmOptions(St...
DeploymentSettings extends BaseSettings { public void setCpu(String cpu) { this.cpu = cpu; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceCount); void setJvmOptions(St...
@Test public void testSetMemoryInGB() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setMemoryInGB("2"); assertEquals("2", deploy.getMemoryInGB()); }
public void setMemoryInGB(String memoryInGB) { this.memoryInGB = memoryInGB; }
DeploymentSettings extends BaseSettings { public void setMemoryInGB(String memoryInGB) { this.memoryInGB = memoryInGB; } }
DeploymentSettings extends BaseSettings { public void setMemoryInGB(String memoryInGB) { this.memoryInGB = memoryInGB; } }
DeploymentSettings extends BaseSettings { public void setMemoryInGB(String memoryInGB) { this.memoryInGB = memoryInGB; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceC...
DeploymentSettings extends BaseSettings { public void setMemoryInGB(String memoryInGB) { this.memoryInGB = memoryInGB; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceC...
@Test public void testSetInstanceCount() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setInstanceCount("3"); assertEquals("3", deploy.getInstanceCount()); }
public void setInstanceCount(String instanceCount) { this.instanceCount = instanceCount; }
DeploymentSettings extends BaseSettings { public void setInstanceCount(String instanceCount) { this.instanceCount = instanceCount; } }
DeploymentSettings extends BaseSettings { public void setInstanceCount(String instanceCount) { this.instanceCount = instanceCount; } }
DeploymentSettings extends BaseSettings { public void setInstanceCount(String instanceCount) { this.instanceCount = instanceCount; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(Stri...
DeploymentSettings extends BaseSettings { public void setInstanceCount(String instanceCount) { this.instanceCount = instanceCount; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(Stri...
@Test public void testSetDeploymentName() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setDeploymentName("deploymentName1"); assertEquals("deploymentName1", deploy.getDeploymentName()); }
public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; }
DeploymentSettings extends BaseSettings { public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } }
DeploymentSettings extends BaseSettings { public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } }
DeploymentSettings extends BaseSettings { public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(...
DeploymentSettings extends BaseSettings { public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(...
@Test public void testSetJvmOptions() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setJvmOptions("jvmOptions1"); assertEquals("jvmOptions1", deploy.getJvmOptions()); }
public void setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; }
DeploymentSettings extends BaseSettings { public void setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; } }
DeploymentSettings extends BaseSettings { public void setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; } }
DeploymentSettings extends BaseSettings { public void setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceC...
DeploymentSettings extends BaseSettings { public void setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(String instanceC...
@Test public void testSetRuntimeVersion() { final DeploymentSettings deploy = new DeploymentSettings(); deploy.setRuntimeVersion("8"); assertEquals("8", deploy.getRuntimeVersion()); }
public void setRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; }
DeploymentSettings extends BaseSettings { public void setRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; } }
DeploymentSettings extends BaseSettings { public void setRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; } }
DeploymentSettings extends BaseSettings { public void setRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(...
DeploymentSettings extends BaseSettings { public void setRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; } String getCpu(); String getMemoryInGB(); String getInstanceCount(); String getDeploymentName(); void setCpu(String cpu); void setMemoryInGB(String memoryInGB); void setInstanceCount(...
@Test public void testWithSubscriptionId() { final SpringConfiguration config = new SpringConfiguration(); config.withSubscriptionId("subscriptionId1"); assertEquals("subscriptionId1", config.getSubscriptionId()); }
public SpringConfiguration withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; }
SpringConfiguration { public SpringConfiguration withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } }
SpringConfiguration { public SpringConfiguration withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } }
SpringConfiguration { public SpringConfiguration withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeployme...
SpringConfiguration { public SpringConfiguration withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeployme...
@Test public void assureInputInBatchModeWhenNotRequired() throws Exception { final AddMojo mojo = getMojoFromPom(); final AddMojo mojoSpy = spy(mojo); final Set<String> set = new HashSet<>(); mojoSpy.assureInputInBatchMode("a0", StringUtils::isNotEmpty, set::add, true); assertTrue(set.contains("a0")); }
protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (required) { throw new MojoFailureExcept...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
AddMojo extends AbstractFunctionMojo { protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator, final Consumer<String> setter, final boolean required) throws MojoFailureException { if (validator.apply(input)) { Log.info(FOUND_VALID_VALUE); setter.accept(input); return; } if (...
@Test public void testWithResourceGroup() { final SpringConfiguration config = new SpringConfiguration(); config.withResourceGroup("resourceGroup1"); assertEquals("resourceGroup1", config.getResourceGroup()); }
public SpringConfiguration withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; }
SpringConfiguration { public SpringConfiguration withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } }
SpringConfiguration { public SpringConfiguration withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } }
SpringConfiguration { public SpringConfiguration withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentNa...
SpringConfiguration { public SpringConfiguration withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentNa...
@Test public void testWithClusterName() { final SpringConfiguration config = new SpringConfiguration(); config.withClusterName("clusterName1"); assertEquals("clusterName1", config.getClusterName()); }
public SpringConfiguration withClusterName(String clusterName) { this.clusterName = clusterName; return this; }
SpringConfiguration { public SpringConfiguration withClusterName(String clusterName) { this.clusterName = clusterName; return this; } }
SpringConfiguration { public SpringConfiguration withClusterName(String clusterName) { this.clusterName = clusterName; return this; } }
SpringConfiguration { public SpringConfiguration withClusterName(String clusterName) { this.clusterName = clusterName; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); De...
SpringConfiguration { public SpringConfiguration withClusterName(String clusterName) { this.clusterName = clusterName; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); De...
@Test public void testWithAppName() { final SpringConfiguration config = new SpringConfiguration(); config.withAppName("appName1"); assertEquals("appName1", config.getAppName()); }
public SpringConfiguration withAppName(String appName) { this.appName = appName; return this; }
SpringConfiguration { public SpringConfiguration withAppName(String appName) { this.appName = appName; return this; } }
SpringConfiguration { public SpringConfiguration withAppName(String appName) { this.appName = appName; return this; } }
SpringConfiguration { public SpringConfiguration withAppName(String appName) { this.appName = appName; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); Deployment getDepl...
SpringConfiguration { public SpringConfiguration withAppName(String appName) { this.appName = appName; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); Deployment getDepl...
@Test public void testWithRuntimeVersion() { final SpringConfiguration config = new SpringConfiguration(); config.withRuntimeVersion("runtimeVersion1"); assertEquals("runtimeVersion1", config.getRuntimeVersion()); }
public SpringConfiguration withRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; }
SpringConfiguration { public SpringConfiguration withRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; } }
SpringConfiguration { public SpringConfiguration withRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; } }
SpringConfiguration { public SpringConfiguration withRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeployme...
SpringConfiguration { public SpringConfiguration withRuntimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeployme...
@Test public void testWithDeployment() { final SpringConfiguration config = new SpringConfiguration(); final Deployment deploy = Mockito.mock(Deployment.class); config.withDeployment(deploy); assertEquals(deploy, config.getDeployment()); }
public SpringConfiguration withDeployment(Deployment deployment) { this.deployment = deployment; return this; }
SpringConfiguration { public SpringConfiguration withDeployment(Deployment deployment) { this.deployment = deployment; return this; } }
SpringConfiguration { public SpringConfiguration withDeployment(Deployment deployment) { this.deployment = deployment; return this; } }
SpringConfiguration { public SpringConfiguration withDeployment(Deployment deployment) { this.deployment = deployment; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); De...
SpringConfiguration { public SpringConfiguration withDeployment(Deployment deployment) { this.deployment = deployment; return this; } Boolean isPublic(); String getSubscriptionId(); String getResourceGroup(); String getClusterName(); String getAppName(); String getRuntimeVersion(); String getActiveDeploymentName(); De...
@Test public void testWithCpu() { final Deployment deploy = new Deployment(); deploy.withCpu(1); assertEquals(1, (int) deploy.getCpu()); }
public Deployment withCpu(Integer cpu) { this.cpu = cpu; return this; }
Deployment { public Deployment withCpu(Integer cpu) { this.cpu = cpu; return this; } }
Deployment { public Deployment withCpu(Integer cpu) { this.cpu = cpu; return this; } }
Deployment { public Deployment withCpu(Integer cpu) { this.cpu = cpu; return this; } Integer getCpu(); Integer getMemoryInGB(); Integer getInstanceCount(); String getDeploymentName(); Map<String, String> getEnvironment(); List<Resource> getResources(); Boolean isEnablePersistentStorage(); String getJvmOptions(); Strin...
Deployment { public Deployment withCpu(Integer cpu) { this.cpu = cpu; return this; } Integer getCpu(); Integer getMemoryInGB(); Integer getInstanceCount(); String getDeploymentName(); Map<String, String> getEnvironment(); List<Resource> getResources(); Boolean isEnablePersistentStorage(); String getJvmOptions(); Strin...
@Test public void testWithMemoryInGB() { final Deployment deploy = new Deployment(); deploy.withMemoryInGB(2); assertEquals(2, (int) deploy.getMemoryInGB()); }
public Deployment withMemoryInGB(Integer memoryInGB) { this.memoryInGB = memoryInGB; return this; }
Deployment { public Deployment withMemoryInGB(Integer memoryInGB) { this.memoryInGB = memoryInGB; return this; } }
Deployment { public Deployment withMemoryInGB(Integer memoryInGB) { this.memoryInGB = memoryInGB; return this; } }
Deployment { public Deployment withMemoryInGB(Integer memoryInGB) { this.memoryInGB = memoryInGB; return this; } Integer getCpu(); Integer getMemoryInGB(); Integer getInstanceCount(); String getDeploymentName(); Map<String, String> getEnvironment(); List<Resource> getResources(); Boolean isEnablePersistentStorage(); S...
Deployment { public Deployment withMemoryInGB(Integer memoryInGB) { this.memoryInGB = memoryInGB; return this; } Integer getCpu(); Integer getMemoryInGB(); Integer getInstanceCount(); String getDeploymentName(); Map<String, String> getEnvironment(); List<Resource> getResources(); Boolean isEnablePersistentStorage(); S...