@Test public void testPullArgumentsWithSpacePlaceholder() throws RepositoryNameAlreadyUsedException, ExecutionException, InterruptedException { Repository repository = repositoryService.createRepository(testIdWatcher.getEntityName("repository")); String localeMapping = "ja:ja-JP"; ThirdPartySync thirdPartySync = new ThirdPartySync(); thirdPartySync.setRepositoryId(repository.getId()); thirdPartySync.setProjectId("projectId"); thirdPartySync.setActions(Arrays.asList(ThirdPartySyncAction.PULL)); thirdPartySync.setPluralSeparator("%s_"); thirdPartySync.setLocaleMapping(localeMapping); thirdPartySync.setSkipTextUnitsWithPattern("text_unit_pattern"); thirdPartySync.setSkipAssetsWithPathPattern("asset_path_pattern"); thirdPartySync.setOptions(Arrays.asList("option1=value1", "option2=value2")); ArgumentCaptor<Repository> repoCaptor = ArgumentCaptor.forClass(Repository.class); thirdPartyService.asyncSyncMojitoWithThirdPartyTMS(thirdPartySync).get(); verify(thirdPartyTMSMock, only()).pull( repoCaptor.capture(), eq("projectId"), eq(" _"), localeMappingArgumentCaptor.capture(), eq("text_unit_pattern"), eq("asset_path_pattern"), optionsArgumentCaptor.capture()); assertThat(repoCaptor.getValue().getId()).isEqualTo(repository.getId()); assertThat(localeMappingArgumentCaptor.getValue()).contains(entry("ja-JP", "ja")); assertThat(optionsArgumentCaptor.getValue()).contains("option1=value1", "option2=value2"); }
public PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync) { ThirdPartySyncJobInput thirdPartySyncJobInput = new ThirdPartySyncJobInput(); thirdPartySyncJobInput.setRepositoryId(thirdPartySync.getRepositoryId()); thirdPartySyncJobInput.setThirdPartyProjectId(thirdPartySync.getProjectId()); thirdPartySyncJobInput.setActions(thirdPartySync.getActions()); thirdPartySyncJobInput.setPluralSeparator(thirdPartySync.getPluralSeparator()); thirdPartySyncJobInput.setLocaleMapping(thirdPartySync.getLocaleMapping()); thirdPartySyncJobInput.setSkipTextUnitsWithPattern(thirdPartySync.getSkipTextUnitsWithPattern()); thirdPartySyncJobInput.setSkipAssetsWithPathPattern(thirdPartySync.getSkipAssetsWithPathPattern()); thirdPartySyncJobInput.setOptions(thirdPartySync.getOptions()); return quartzPollableTaskScheduler.scheduleJob(ThirdPartySyncJob.class, thirdPartySyncJobInput); }
ThirdPartyService { public PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync) { ThirdPartySyncJobInput thirdPartySyncJobInput = new ThirdPartySyncJobInput(); thirdPartySyncJobInput.setRepositoryId(thirdPartySync.getRepositoryId()); thirdPartySyncJobInput.setThirdPartyProjectId(thirdPartySync.getProjectId()); thirdPartySyncJobInput.setActions(thirdPartySync.getActions()); thirdPartySyncJobInput.setPluralSeparator(thirdPartySync.getPluralSeparator()); thirdPartySyncJobInput.setLocaleMapping(thirdPartySync.getLocaleMapping()); thirdPartySyncJobInput.setSkipTextUnitsWithPattern(thirdPartySync.getSkipTextUnitsWithPattern()); thirdPartySyncJobInput.setSkipAssetsWithPathPattern(thirdPartySync.getSkipAssetsWithPathPattern()); thirdPartySyncJobInput.setOptions(thirdPartySync.getOptions()); return quartzPollableTaskScheduler.scheduleJob(ThirdPartySyncJob.class, thirdPartySyncJobInput); } }
ThirdPartyService { public PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync) { ThirdPartySyncJobInput thirdPartySyncJobInput = new ThirdPartySyncJobInput(); thirdPartySyncJobInput.setRepositoryId(thirdPartySync.getRepositoryId()); thirdPartySyncJobInput.setThirdPartyProjectId(thirdPartySync.getProjectId()); thirdPartySyncJobInput.setActions(thirdPartySync.getActions()); thirdPartySyncJobInput.setPluralSeparator(thirdPartySync.getPluralSeparator()); thirdPartySyncJobInput.setLocaleMapping(thirdPartySync.getLocaleMapping()); thirdPartySyncJobInput.setSkipTextUnitsWithPattern(thirdPartySync.getSkipTextUnitsWithPattern()); thirdPartySyncJobInput.setSkipAssetsWithPathPattern(thirdPartySync.getSkipAssetsWithPathPattern()); thirdPartySyncJobInput.setOptions(thirdPartySync.getOptions()); return quartzPollableTaskScheduler.scheduleJob(ThirdPartySyncJob.class, thirdPartySyncJobInput); }  }
ThirdPartyService { public PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync) { ThirdPartySyncJobInput thirdPartySyncJobInput = new ThirdPartySyncJobInput(); thirdPartySyncJobInput.setRepositoryId(thirdPartySync.getRepositoryId()); thirdPartySyncJobInput.setThirdPartyProjectId(thirdPartySync.getProjectId()); thirdPartySyncJobInput.setActions(thirdPartySync.getActions()); thirdPartySyncJobInput.setPluralSeparator(thirdPartySync.getPluralSeparator()); thirdPartySyncJobInput.setLocaleMapping(thirdPartySync.getLocaleMapping()); thirdPartySyncJobInput.setSkipTextUnitsWithPattern(thirdPartySync.getSkipTextUnitsWithPattern()); thirdPartySyncJobInput.setSkipAssetsWithPathPattern(thirdPartySync.getSkipAssetsWithPathPattern()); thirdPartySyncJobInput.setOptions(thirdPartySync.getOptions()); return quartzPollableTaskScheduler.scheduleJob(ThirdPartySyncJob.class, thirdPartySyncJobInput); }  PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync); }
ThirdPartyService { public PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync) { ThirdPartySyncJobInput thirdPartySyncJobInput = new ThirdPartySyncJobInput(); thirdPartySyncJobInput.setRepositoryId(thirdPartySync.getRepositoryId()); thirdPartySyncJobInput.setThirdPartyProjectId(thirdPartySync.getProjectId()); thirdPartySyncJobInput.setActions(thirdPartySync.getActions()); thirdPartySyncJobInput.setPluralSeparator(thirdPartySync.getPluralSeparator()); thirdPartySyncJobInput.setLocaleMapping(thirdPartySync.getLocaleMapping()); thirdPartySyncJobInput.setSkipTextUnitsWithPattern(thirdPartySync.getSkipTextUnitsWithPattern()); thirdPartySyncJobInput.setSkipAssetsWithPathPattern(thirdPartySync.getSkipAssetsWithPathPattern()); thirdPartySyncJobInput.setOptions(thirdPartySync.getOptions()); return quartzPollableTaskScheduler.scheduleJob(ThirdPartySyncJob.class, thirdPartySyncJobInput); }  PollableFuture<Void> asyncSyncMojitoWithThirdPartyTMS(ThirdPartySync thirdPartySync);  }