@Test public void testProcessApiWithNoApisShouldNotCallMethodProcessApi() throws MojoExecutionException, AppException { when(publicationReader.read(anyString(), any())).thenReturn(createPublication()); sut.execute(); verify(axwayPublishingAdapter, Mockito.never()).processApi(any(), anyString()); }
public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } } }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  void execute(); PublicationReader getPublicationReader(); String getStageConfigurationFile(); void setStageConfigurationFile(final String stageConfiguationFile); MavenProject getProject(); void setProject(final MavenProject project); }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  void execute(); PublicationReader getPublicationReader(); String getStageConfigurationFile(); void setStageConfigurationFile(final String stageConfiguationFile); MavenProject getProject(); void setProject(final MavenProject project);  }