@Test public void testDeploy() { org.uberfire.java.nio.file.Path resourcePath = mock(org.uberfire.java.nio.file.Path.class); when(resources.resolveResourcesPath(eq(metadata))).thenReturn(resourcePath); tested.deploy(metadata, URL); ArgumentCaptor<Assets> assetsArgumentCaptor = ArgumentCaptor.forClass(Assets.class); verify(backendFileSystemManager, times(1)) .deploy(eq(resourcePath), assetsArgumentCaptor.capture(), anyString()); Assets assets = assetsArgumentCaptor.getValue(); assertNotNull(assets); assertEquals(2, assets.getAssets().size()); assertTrue(assets.getAssets().contains(widAsset)); assertTrue(assets.getAssets().contains(iconAsset)); }
@Override public void deploy(final Metadata metadata) { deploy(metadata, System.getProperty(PROPERTY_SERVICE_REPO), System.getProperty(PROPERTY_SERVICE_REPO_TASKNAMES)); }
WorkItemDefinitionRemoteDeployService implements WorkItemDefinitionDeployService { @Override public void deploy(final Metadata metadata) { deploy(metadata, System.getProperty(PROPERTY_SERVICE_REPO), System.getProperty(PROPERTY_SERVICE_REPO_TASKNAMES)); } }
WorkItemDefinitionRemoteDeployService implements WorkItemDefinitionDeployService { @Override public void deploy(final Metadata metadata) { deploy(metadata, System.getProperty(PROPERTY_SERVICE_REPO), System.getProperty(PROPERTY_SERVICE_REPO_TASKNAMES)); } protected  WorkItemDefinitionRemoteDeployService(); @Inject  WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                                 final BackendFileSystemManager backendFileSystemManager,
                                                 final WorkItemDefinitionResources resources,
                                                 final WorkItemDefinitionProjectInstaller projectInstaller);   WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                          final BackendFileSystemManager backendFileSystemManager,
                                          final WorkItemDefinitionResources resources,
                                          final WorkItemDefinitionProjectInstaller projectInstaller,
                                          final Function<WorkItemDefinition, Asset> widAssetBuilder,
                                          final Function<WorkItemDefinition, Asset> iconAssetBuilder); }
WorkItemDefinitionRemoteDeployService implements WorkItemDefinitionDeployService { @Override public void deploy(final Metadata metadata) { deploy(metadata, System.getProperty(PROPERTY_SERVICE_REPO), System.getProperty(PROPERTY_SERVICE_REPO_TASKNAMES)); } protected  WorkItemDefinitionRemoteDeployService(); @Inject  WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                                 final BackendFileSystemManager backendFileSystemManager,
                                                 final WorkItemDefinitionResources resources,
                                                 final WorkItemDefinitionProjectInstaller projectInstaller);   WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                          final BackendFileSystemManager backendFileSystemManager,
                                          final WorkItemDefinitionResources resources,
                                          final WorkItemDefinitionProjectInstaller projectInstaller,
                                          final Function<WorkItemDefinition, Asset> widAssetBuilder,
                                          final Function<WorkItemDefinition, Asset> iconAssetBuilder); @Override void deploy(final Metadata metadata); }
WorkItemDefinitionRemoteDeployService implements WorkItemDefinitionDeployService { @Override public void deploy(final Metadata metadata) { deploy(metadata, System.getProperty(PROPERTY_SERVICE_REPO), System.getProperty(PROPERTY_SERVICE_REPO_TASKNAMES)); } protected  WorkItemDefinitionRemoteDeployService(); @Inject  WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                                 final BackendFileSystemManager backendFileSystemManager,
                                                 final WorkItemDefinitionResources resources,
                                                 final WorkItemDefinitionProjectInstaller projectInstaller);   WorkItemDefinitionRemoteDeployService(final WorkItemDefinitionService<WorkItemDefinitionRemoteRequest> remoteLookupService,
                                          final BackendFileSystemManager backendFileSystemManager,
                                          final WorkItemDefinitionResources resources,
                                          final WorkItemDefinitionProjectInstaller projectInstaller,
                                          final Function<WorkItemDefinition, Asset> widAssetBuilder,
                                          final Function<WorkItemDefinition, Asset> iconAssetBuilder); @Override void deploy(final Metadata metadata); static final String PROPERTY_SERVICE_REPO; static final String PROPERTY_SERVICE_REPO_TASKNAMES; }