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 testReadEntry() throws Exception { when(ioService.readAllString(path)).thenReturn(MARSHALLED_ENTRY); when(entryMarshaller.unmarshal(MARSHALLED_ENTRY)).thenReturn(entry); when(entry.getContentType()).thenReturn(Object.class.getName()); when(entry.getContent()).thenReturn(MARSHALLED_VALUE); when(marshal... | public Object readEntry(final Path path) throws Exception { final String entryContent = ioService.readAllString(path); final VFSRegistryEntry entry = entryMarshaller.unmarshal(entryContent); final Marshaller marshaller = marshallerRegistry.get(Class.forName(entry.getContentType())); if (marshaller == null) { throw new ... | VFSRegistryHelper { public Object readEntry(final Path path) throws Exception { final String entryContent = ioService.readAllString(path); final VFSRegistryEntry entry = entryMarshaller.unmarshal(entryContent); final Marshaller marshaller = marshallerRegistry.get(Class.forName(entry.getContentType())); if (marshaller =... | VFSRegistryHelper { public Object readEntry(final Path path) throws Exception { final String entryContent = ioService.readAllString(path); final VFSRegistryEntry entry = entryMarshaller.unmarshal(entryContent); final Marshaller marshaller = marshallerRegistry.get(Class.forName(entry.getContentType())); if (marshaller =... | VFSRegistryHelper { public Object readEntry(final Path path) throws Exception { final String entryContent = ioService.readAllString(path); final VFSRegistryEntry entry = entryMarshaller.unmarshal(entryContent); final Marshaller marshaller = marshallerRegistry.get(Class.forName(entry.getContentType())); if (marshaller =... | VFSRegistryHelper { public Object readEntry(final Path path) throws Exception { final String entryContent = ioService.readAllString(path); final VFSRegistryEntry entry = entryMarshaller.unmarshal(entryContent); final Marshaller marshaller = marshallerRegistry.get(Class.forName(entry.getContentType())); if (marshaller =... |
@Test public void testReadEntries() throws Exception { prepareReadEntries(); List<Object> result = registryHelper.readEntries(rootPath, filter); assertEquals(expectedObjects, result); for (Path path : entryPaths) { verify(registryHelper, times(1)).readEntry(path); } } | public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was pro... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... |
@Test public void testReadEntriesWithError() throws Exception { prepareReadEntries(); int failingIndex = 5; when(marshaller.unmarshal(entries.get(failingIndex).getContent())).thenThrow(new IOException(ERROR_MESSAGE)); expectedException.expectMessage(ERROR_MESSAGE); registryHelper.readEntries(rootPath, filter); for (int... | public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was pro... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... | VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.err... |
@Test public void testWriteBatch() { when(path.getFileSystem()).thenReturn(fileSystem); registryHelper.writeBatch(path, MARSHALLED_VALUE); verify(ioService, times(1)).startBatch(fileSystem); verify(ioService, times(1)).write(path, MARSHALLED_VALUE); verify(ioService, times(1)).endBatch(); } | public void writeBatch(final Path path, final String content) { try { ioService.startBatch(path.getFileSystem()); ioService.write(path, content); } finally { ioService.endBatch(); } } | VFSRegistryHelper { public void writeBatch(final Path path, final String content) { try { ioService.startBatch(path.getFileSystem()); ioService.write(path, content); } finally { ioService.endBatch(); } } } | VFSRegistryHelper { public void writeBatch(final Path path, final String content) { try { ioService.startBatch(path.getFileSystem()); ioService.write(path, content); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
... | VFSRegistryHelper { public void writeBatch(final Path path, final String content) { try { ioService.startBatch(path.getFileSystem()); ioService.write(path, content); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
... | VFSRegistryHelper { public void writeBatch(final Path path, final String content) { try { ioService.startBatch(path.getFileSystem()); ioService.write(path, content); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
... |
@Test public void testDeleteBatch() { when(path.getFileSystem()).thenReturn(fileSystem); registryHelper.deleteBatch(path); verify(ioService, times(1)).startBatch(fileSystem); verify(ioService, times(1)).deleteIfExists(path); verify(ioService, times(1)).endBatch(); } | public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } | VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } } | VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
final @Named... | VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
final @Named... | VFSRegistryHelper { public void deleteBatch(final Path path) { try { ioService.startBatch(path.getFileSystem()); ioService.deleteIfExists(path); } finally { ioService.endBatch(); } } VFSRegistryHelper(); @Inject VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
final @Named... |
@Test public void testInit() throws Exception { providers = new ArrayList<>(); providers.addAll(mockProviderListSPI(providerType, ELEMENTS_COUNT)); runtimes = new ArrayList<>(); runtimes.addAll(mockRuntimeList(providerId, "", ELEMENTS_COUNT)); when(registryHelper.readEntries(registryRoot, VFSRegistryHelper.BySuffixFilt... | @PostConstruct protected void init() { initializeRegistryRoot(); initializeRegistry(); } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @PostConstruct protected void init() { initializeRegistryRoot(); initializeRegistry(); } } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @PostConstruct protected void init() { initializeRegistryRoot(); initializeRegistry(); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @PostConstruct protected void init() { initializeRegistryRoot(); initializeRegistry(); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); @Override void registerProvider(final Provider provider); @Override void deregisterProv... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @PostConstruct protected void init() { initializeRegistryRoot(); initializeRegistry(); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); @Override void registerProvider(final Provider provider); @Override void deregisterProv... |
@Test @Override public void testRegisterProvider() { prepareProviderTargetPath(); runtimeRegistry.registerProvider(provider); try { verify(registryHelper, times(1)).storeEntry(providerTargetPath, provider); } catch (Exception e) { fail(e.getMessage()); } verifyProviderIsRegistered(provider); } | @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was produced during provider marshalling/storing, provider:... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... |
@Test public void testRegisterProviderWhenMarshallingErrors() throws Exception { prepareProviderTargetPath(); expectedException.expectMessage("Unexpected error was produced during provider marshalling/storing, provider: " + provider); doThrow(new Exception("no matter the message here")) .when(registryHelper) .storeEntr... | @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was produced during provider marshalling/storing, provider:... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); final Path path = buildProviderPath(provider.getId()); try { registryHelper.storeEntry(path, provider); } catch (Exception e) { logger.error("Unexpected error was pr... |
@Test @Override public void testDeregisterProvider() { prepareProviderTargetPath(); runtimeRegistry.registerProvider(provider); verifyProviderIsRegistered(provider); runtimeRegistry.deregisterProvider(provider); verify(registryHelper, times(1)).deleteBatch(providerTargetPath); verifyProviderIsNotRegistered(provider); } | @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); deregisterProvider(provider.getId()); } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); deregisterProvider(provider.getId()); } } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); deregisterProvider(provider.getId()); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); deregisterProvider(provider.getId()); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); @Override void registerProvider(... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); deregisterProvider(provider.getId()); } VFSRuntimeRegistry(); @Inject VFSRuntimeRegistry(final VFSRegistryHelper registryHelper); @Override void registerProvider(... |
@Test @Override public void testRegisterRuntime() { prepareRuntimeTargetPath(); runtimeRegistry.registerRuntime(runtime); try { verify(registryHelper, times(1)).storeEntry(runtimeTargetPath, runtime); } catch (Exception e) { fail(e.getMessage()); } verifyRuntimeIsRegistered(runtime); } | @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced during runtime marshalling/storing, runtime: " + runti... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... |
@Test public void testOnNodeMouseEventWhenNestedOnBodyWithoutCellSelection() { when(event.isShiftKeyDown()).thenReturn(false); when(event.isControlKeyDown()).thenReturn(true); when(parentGridData.getSelectedCells()).thenReturn(Collections.emptyList()); setupGrid(() -> parent, () -> 1); uiHeaderRowIndex = Optional.empty... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (DynamicReadOn... | DelegatingGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIn... | DelegatingGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIn... | DelegatingGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIn... | DelegatingGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIn... |
@Test public void testRegisterRuntimeWhenMarshallingErrors() throws Exception { prepareRuntimeTargetPath(); expectedException.expectMessage("Unexpected error was produced during runtime marshalling/storing, runtime: " + runtime); doThrow(new Exception("no matter the message here")) .when(registryHelper) .storeEntry(run... | @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced during runtime marshalling/storing, runtime: " + runti... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); final Path path = buildRuntimePath(runtime.getId()); try { registryHelper.storeEntry(path, runtime); } catch (Exception e) { logger.error("Unexpected error was produced d... |
@Test @Override public void testDeregisterRuntime() { prepareRuntimeTargetPath(); runtimeRegistry.registerRuntime(runtime); verifyRuntimeIsRegistered(runtime); runtimeRegistry.deregisterRuntime(runtime); verify(registryHelper, times(1)).deleteBatch(runtimeTargetPath); verifyRuntimeIsNotRegistered(runtime); } | @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); final Path path = buildRuntimePath(runtimeId.getId()); registryHelper.deleteBatch(path); super.deregisterRuntime(runtimeId); } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); final Path path = buildRuntimePath(runtimeId.getId()); registryHelper.deleteBatch(path); super.deregisterRuntime(runtimeId); } } | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); final Path path = buildRuntimePath(runtimeId.getId()); registryHelper.deleteBatch(path); super.deregisterRuntime(runtimeId); } VFSRuntimeRegistry(); @Inject VF... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); final Path path = buildRuntimePath(runtimeId.getId()); registryHelper.deleteBatch(path); super.deregisterRuntime(runtimeId); } VFSRuntimeRegistry(); @Inject VF... | VFSRuntimeRegistry extends InMemoryRuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); final Path path = buildRuntimePath(runtimeId.getId()); registryHelper.deleteBatch(path); super.deregisterRuntime(runtimeId); } VFSRuntimeRegistry(); @Inject VF... |
@Test public void testInit() throws Exception { traces = new ArrayList<>(); for (int i = 0; i < TRACES_COUNT; i++) { PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class); when(trace.getTaskId()).thenReturn(PIPELINE_EXECUTION_ID + Integer.toString(i)); traces.add(trace); } when(registryHelper.readEntries(regi... | @PostConstruct public void init() { initializeRegistryRoot(); initializeRegistry(); } | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @PostConstruct public void init() { initializeRegistryRoot(); initializeRegistry(); } } | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @PostConstruct public void init() { initializeRegistryRoot(); initializeRegistry(); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); } | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @PostConstruct public void init() { initializeRegistryRoot(); initializeRegistry(); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); @PostConstruct void init(); @Override void register(fi... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @PostConstruct public void init() { initializeRegistryRoot(); initializeRegistry(); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); @PostConstruct void init(); @Override void register(fi... |
@Test @Override public void testRegister() { prepareTargetPath(); pipelineExecutorRegistry.register(trace); try { verify(registryHelper, times(1)).storeEntry(traceTargetPath, trace); } catch (Exception e) { fail(e.getMessage()); } PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTI... | @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e);... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... |
@Test public void testRegisterWhenMarshallingErrors() throws Exception { prepareTargetPath(); expectedException.expectMessage("Unexpected error was produced during trace marshalling/storing, trace: " + trace); doThrow(new Exception("no matter the message here")) .when(registryHelper) .storeEntry(traceTargetPath, trace)... | @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e);... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected err... |
@Test @Override public void testDeregister() { prepareTargetPath(); pipelineExecutorRegistry.register(trace); PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID); assertEquals(trace, result); pipelineExecutorRegistry.deregister(PIPELINE_EXECUTION_ID); verify(registryHelper, t... | @Override public void deregister(final String taskId) { checkNotNull("taskId", taskId); final Path path = buildTracePath(taskId); registryHelper.deleteBatch(path); super.deregister(taskId); } | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void deregister(final String taskId) { checkNotNull("taskId", taskId); final Path path = buildTracePath(taskId); registryHelper.deleteBatch(path); super.deregister(taskId); } } | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void deregister(final String taskId) { checkNotNull("taskId", taskId); final Path path = buildTracePath(taskId); registryHelper.deleteBatch(path); super.deregister(taskId); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecut... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void deregister(final String taskId) { checkNotNull("taskId", taskId); final Path path = buildTracePath(taskId); registryHelper.deleteBatch(path); super.deregister(taskId); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecut... | VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void deregister(final String taskId) { checkNotNull("taskId", taskId); final Path path = buildTracePath(taskId); registryHelper.deleteBatch(path); super.deregister(taskId); } VFSPipelineExecutorRegistry(); @Inject VFSPipelineExecut... |
@Test public void basicTest() { final Test1 object = new Test1() { }; final Test1 newObject = VariableInterpolation.interpolate(new HashMap<String, Object>() {{ put("input", new HashMap<String, String>() {{ put("value1", "myvalue1"); put("value2", "myvalue2"); }}); }}, object); assertEquals("myvalue1", newObject.getVal... | public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... |
@Test public void missingContentTest() { final Test1 object = new Test1() { }; final Test1 newObject = VariableInterpolation.interpolate(new HashMap<String, Object>() {{ put("input", new HashMap<String, String>() {{ put("value2", "myvalue2"); }}); }}, object); assertEquals("", newObject.getValue1()); assertEquals("myva... | public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... |
@Test public void testPreserveImplementedInterfaces() { Object object = new Test1Class(); Object newObject = VariableInterpolation.interpolate(new HashMap<>(), object); assertTrue(newObject instanceof Test1); object = new Test2Class(); newObject = VariableInterpolation.interpolate(new HashMap<>(), object); assertTrue(n... | public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); } | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... | VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private VariableInterpolation(); static T interpolate(final Map<String, Object> values,
f... |
@Test public void testNewBuilder() { ConfigBasedPipelineBuilder builder = PipelineFactory.newBuilder(); for (int i = 0; i < CONFIG_COUNT; i++) { builder.addConfigStage(mockConfigStageName(i), configs.get(i)); } ConfigBasedPipeline result = builder.buildAs(PIPELINE_NAME); assertPipelineIsTheExpected(result); } | public static ConfigBasedPipelineBuilder newBuilder() { return new ConfigBasedPipelineBuilder() { private final List<PipelineConfigStage> configStages = new ArrayList<>(); @Override public ConfigBasedPipelineBuilder addConfigStage(final String name, final Config config) { configStages.add(new PipelineConfigStage(name, ... | PipelineFactory { public static ConfigBasedPipelineBuilder newBuilder() { return new ConfigBasedPipelineBuilder() { private final List<PipelineConfigStage> configStages = new ArrayList<>(); @Override public ConfigBasedPipelineBuilder addConfigStage(final String name, final Config config) { configStages.add(new Pipeline... | PipelineFactory { public static ConfigBasedPipelineBuilder newBuilder() { return new ConfigBasedPipelineBuilder() { private final List<PipelineConfigStage> configStages = new ArrayList<>(); @Override public ConfigBasedPipelineBuilder addConfigStage(final String name, final Config config) { configStages.add(new Pipeline... | PipelineFactory { public static ConfigBasedPipelineBuilder newBuilder() { return new ConfigBasedPipelineBuilder() { private final List<PipelineConfigStage> configStages = new ArrayList<>(); @Override public ConfigBasedPipelineBuilder addConfigStage(final String name, final Config config) { configStages.add(new Pipeline... | PipelineFactory { public static ConfigBasedPipelineBuilder newBuilder() { return new ConfigBasedPipelineBuilder() { private final List<PipelineConfigStage> configStages = new ArrayList<>(); @Override public ConfigBasedPipelineBuilder addConfigStage(final String name, final Config config) { configStages.add(new Pipeline... |
@Test public void testOnNodeMouseEventWhenOnlyVisualChangeAllowed() { when(gridWidget.isOnlyVisualChangeAllowed()).thenReturn(true); assertThat(handler.onNodeMouseEvent(gridWidget, relativeLocation, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), clickEvent)).isFalse(); verify(gridWidget, never(... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (DynamicReadOn... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... |
@Test public void testNewPipeline() { List<PipelineConfigStage> configStages = new ArrayList<>(); for (int i = 0; i < CONFIG_COUNT; i++) { configStages.add(new PipelineConfigStage(mockConfigStageName(i), configs.get(i))); } PipelineConfigImpl pipelineConfig = new PipelineConfigImpl(PIPELINE_NAME, configStages); ConfigB... | public static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig) { return new ConfigBasedPipelineImpl(pipelineConfig); } | PipelineFactory { public static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig) { return new ConfigBasedPipelineImpl(pipelineConfig); } } | PipelineFactory { public static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig) { return new ConfigBasedPipelineImpl(pipelineConfig); } private PipelineFactory(); } | PipelineFactory { public static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig) { return new ConfigBasedPipelineImpl(pipelineConfig); } private PipelineFactory(); static ConfigBasedPipelineBuilder newBuilder(); static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig); } | PipelineFactory { public static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig) { return new ConfigBasedPipelineImpl(pipelineConfig); } private PipelineFactory(); static ConfigBasedPipelineBuilder newBuilder(); static ConfigBasedPipeline newPipeline(final PipelineConfig pipelineConfig); } |
@Test public void testCreateExecutorServiceWithDefaultValue() { ExecutorService executorService = taskManagerHelper.createExecutorService(); verifyExecutorServiceAndDestroy(executorService, PipelineExecutorTaskManagerImpl.DEFAULT_THREAD_POOL_SIZE); } | public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_PROPERTY_NAME + " property was not set, ... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... |
@Test public void testCreateExecutorServiceWithManualValueCorrect() { int valueToSet = 1234; System.setProperty(PipelineExecutorTaskManagerImpl.THREAD_POOL_SIZE_PROPERTY_NAME, Integer.toString(valueToSet)); ExecutorService executorService = taskManagerHelper.createExecutorService(); verifyExecutorServiceAndDestroy(exec... | public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_PROPERTY_NAME + " property was not set, ... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... |
@Test public void testCreateExecutorServiceWithManualValueIncorrect() { String valueToSet = "an invalid integer"; System.setProperty(PipelineExecutorTaskManagerImpl.THREAD_POOL_SIZE_PROPERTY_NAME, valueToSet); ExecutorService executorService = taskManagerHelper.createExecutorService(); verifyExecutorServiceAndDestroy(e... | public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_PROPERTY_NAME + " property was not set, ... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... | PipelineExecutorTaskManagerImplHelper { public ExecutorService createExecutorService() { final String threadPoolSizeValue = System.getProperties().getProperty(THREAD_POOL_SIZE_PROPERTY_NAME); int threadPoolSize; if (threadPoolSizeValue == null) { threadPoolSize = DEFAULT_THREAD_POOL_SIZE; logger.debug(THREAD_POOL_SIZE_... |
@Test public void testCreatePipelineExecutor() { assertNotNull(taskManagerHelper.createPipelineExecutor()); verify(configExecutorsInstance, times(1)).iterator(); verify(taskManagerHelper, times(1)).newPipelineExecutor(configExecutors); } | public PipelineExecutor createPipelineExecutor() { final Collection<ConfigExecutor> configs = new ArrayList<>(); configExecutorInstance.iterator().forEachRemaining(configs::add); return newPipelineExecutor(configs); } | PipelineExecutorTaskManagerImplHelper { public PipelineExecutor createPipelineExecutor() { final Collection<ConfigExecutor> configs = new ArrayList<>(); configExecutorInstance.iterator().forEachRemaining(configs::add); return newPipelineExecutor(configs); } } | PipelineExecutorTaskManagerImplHelper { public PipelineExecutor createPipelineExecutor() { final Collection<ConfigExecutor> configs = new ArrayList<>(); configExecutorInstance.iterator().forEachRemaining(configs::add); return newPipelineExecutor(configs); } PipelineExecutorTaskManagerImplHelper(final Instance<ConfigExe... | PipelineExecutorTaskManagerImplHelper { public PipelineExecutor createPipelineExecutor() { final Collection<ConfigExecutor> configs = new ArrayList<>(); configExecutorInstance.iterator().forEachRemaining(configs::add); return newPipelineExecutor(configs); } PipelineExecutorTaskManagerImplHelper(final Instance<ConfigExe... | PipelineExecutorTaskManagerImplHelper { public PipelineExecutor createPipelineExecutor() { final Collection<ConfigExecutor> configs = new ArrayList<>(); configExecutorInstance.iterator().forEachRemaining(configs::add); return newPipelineExecutor(configs); } PipelineExecutorTaskManagerImplHelper(final Instance<ConfigExe... |
@Test public void testCreateExternalListeners() { List<PipelineEventListener> result = taskManagerHelper.createExternalListeners(); verify(eventListenersInstance, times(1)).iterator(); assertEquals(externalListeners, result); } | public List<PipelineEventListener> createExternalListeners() { List<PipelineEventListener> eventListeners = new ArrayList<>(); pipelineEventListenerInstance.iterator().forEachRemaining(eventListeners::add); return eventListeners; } | PipelineExecutorTaskManagerImplHelper { public List<PipelineEventListener> createExternalListeners() { List<PipelineEventListener> eventListeners = new ArrayList<>(); pipelineEventListenerInstance.iterator().forEachRemaining(eventListeners::add); return eventListeners; } } | PipelineExecutorTaskManagerImplHelper { public List<PipelineEventListener> createExternalListeners() { List<PipelineEventListener> eventListeners = new ArrayList<>(); pipelineEventListenerInstance.iterator().forEachRemaining(eventListeners::add); return eventListeners; } PipelineExecutorTaskManagerImplHelper(final Inst... | PipelineExecutorTaskManagerImplHelper { public List<PipelineEventListener> createExternalListeners() { List<PipelineEventListener> eventListeners = new ArrayList<>(); pipelineEventListenerInstance.iterator().forEachRemaining(eventListeners::add); return eventListeners; } PipelineExecutorTaskManagerImplHelper(final Inst... | PipelineExecutorTaskManagerImplHelper { public List<PipelineEventListener> createExternalListeners() { List<PipelineEventListener> eventListeners = new ArrayList<>(); pipelineEventListenerInstance.iterator().forEachRemaining(eventListeners::add); return eventListeners; } PipelineExecutorTaskManagerImplHelper(final Inst... |
@Test public void testSetTaskInStoppedStatus() { List<String> scheduledStages = mockStages(STAGES_COUNT, "scheduled"); List<String> runningStages = mockStages(STAGES_COUNT, "running"); List<String> finishedStages = mockStages(STAGES_COUNT, "finished"); List<String> errorStages = mockStages(STAGES_COUNT, "error"); List<... | public void setTaskInStoppedStatus(final PipelineExecutorTaskImpl task) { task.setPipelineStatus(PipelineExecutorTask.Status.STOPPED); task.getTaskDef().getStages() .stream() .filter(stage -> PipelineExecutorTask.Status.RUNNING.equals(task.getStageStatus(stage)) || PipelineExecutorTask.Status.SCHEDULED.equals(task.getS... | PipelineExecutorTaskManagerImplHelper { public void setTaskInStoppedStatus(final PipelineExecutorTaskImpl task) { task.setPipelineStatus(PipelineExecutorTask.Status.STOPPED); task.getTaskDef().getStages() .stream() .filter(stage -> PipelineExecutorTask.Status.RUNNING.equals(task.getStageStatus(stage)) || PipelineExecut... | PipelineExecutorTaskManagerImplHelper { public void setTaskInStoppedStatus(final PipelineExecutorTaskImpl task) { task.setPipelineStatus(PipelineExecutorTask.Status.STOPPED); task.getTaskDef().getStages() .stream() .filter(stage -> PipelineExecutorTask.Status.RUNNING.equals(task.getStageStatus(stage)) || PipelineExecut... | PipelineExecutorTaskManagerImplHelper { public void setTaskInStoppedStatus(final PipelineExecutorTaskImpl task) { task.setPipelineStatus(PipelineExecutorTask.Status.STOPPED); task.getTaskDef().getStages() .stream() .filter(stage -> PipelineExecutorTask.Status.RUNNING.equals(task.getStageStatus(stage)) || PipelineExecut... | PipelineExecutorTaskManagerImplHelper { public void setTaskInStoppedStatus(final PipelineExecutorTaskImpl task) { task.setPipelineStatus(PipelineExecutorTask.Status.STOPPED); task.getTaskDef().getStages() .stream() .filter(stage -> PipelineExecutorTask.Status.RUNNING.equals(task.getStageStatus(stage)) || PipelineExecut... |
@Test public void testRegister() { pipelineExecutorRegistry.register(trace); PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID); assertEquals(trace, result); } | @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); recordsMap.put(trace.getTaskId(), trace); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); recordsMap.put(trace.getTaskId(), trace); } } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); recordsMap.put(trace.getTaskId(), trace); } InMemoryPipelineExecutorRegistry(); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); recordsMap.put(trace.getTaskId(), trace); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregi... | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); recordsMap.put(trace.getTaskId(), trace); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregi... |
@Test public void testDeregister() { pipelineExecutorRegistry.register(trace); PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID); assertEquals(trace, result); pipelineExecutorRegistry.deregister(trace.getTaskId()); result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE... | public void deregister(final String pipelineExecutionId) { checkNotNull("pipelineExecutionId", pipelineExecutionId); recordsMap.remove(pipelineExecutionId); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { public void deregister(final String pipelineExecutionId) { checkNotNull("pipelineExecutionId", pipelineExecutionId); recordsMap.remove(pipelineExecutionId); } } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { public void deregister(final String pipelineExecutionId) { checkNotNull("pipelineExecutionId", pipelineExecutionId); recordsMap.remove(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { public void deregister(final String pipelineExecutionId) { checkNotNull("pipelineExecutionId", pipelineExecutionId); recordsMap.remove(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace tr... | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { public void deregister(final String pipelineExecutionId) { checkNotNull("pipelineExecutionId", pipelineExecutionId); recordsMap.remove(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace tr... |
@Test public void testGetExecutorTrace() { pipelineExecutorRegistry.register(trace); PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID); assertEquals(trace, result); } | @Override public PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId) { return recordsMap.get(pipelineExecutionId); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId) { return recordsMap.get(pipelineExecutionId); } } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId) { return recordsMap.get(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId) { return recordsMap.get(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister... | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId) { return recordsMap.get(pipelineExecutionId); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister... |
@Test public void testOnNodeMouseEventWhenIsReadOnlyDiagram() { when(gridWidget.isOnlyVisualChangeAllowed()).thenReturn(false); when(readOnlyProvider.isReadOnlyDiagram()).thenReturn(true); assertThat(handler.onNodeMouseEvent(gridWidget, relativeLocation, Optional.empty(), Optional.empty(), Optional.empty(), Optional.em... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (DynamicReadOn... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiR... |
@Test public void testGetExecutorTraces() { List<PipelineExecutorTrace> traces = new ArrayList<>(); for (int i = 0; i < TRACES_COUNT; i++) { PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class); when(trace.getTaskId()).thenReturn(PIPELINE_EXECUTION_ID + Integer.toString(i)); traces.add(trace); } traces.forEa... | @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); } | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister(final String pipelineExecutionId);... | InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister(final String pipelineExecutionId);... |
@Test public void testRegisterPipeline() { verifyPipelineIsNotRegistered(pipeline); pipelineRegistry.registerPipeline(pipeline); verifyPipelineIsRegistered(pipeline); } | @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline)... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline)... |
@Test public void testRegisterPipelineForProviderType() { verifyPipelineIsNotRegistered(pipeline); pipelineRegistry.registerPipeline(pipeline, providerType); verifyPipelineIsRegisteredForProviderType(pipeline, providerType); } | @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline)... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public void registerPipeline(final Pipeline pipeline) { checkNotNull("pipeline", pipeline); pipelineByName.put(pipeline.getName(), new PipelineRegistryEntry(pipeline)); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline)... |
@Test public void testGetPipelineByName() { verifyPipelineIsNotRegistered(pipeline); pipelineRegistry.registerPipeline(pipeline); Pipeline result = pipelineRegistry.getPipelineByName(PIPELINE_ID); assertEquals(pipeline, result); } | @Override public Pipeline getPipelineByName(final String pipelineId) { checkNotNull("pipelineId", pipelineId); return pipelineByName.get(pipelineId).getPipeline(); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public Pipeline getPipelineByName(final String pipelineId) { checkNotNull("pipelineId", pipelineId); return pipelineByName.get(pipelineId).getPipeline(); } } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public Pipeline getPipelineByName(final String pipelineId) { checkNotNull("pipelineId", pipelineId); return pipelineByName.get(pipelineId).getPipeline(); } InMemoryPipelineRegistry(); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public Pipeline getPipelineByName(final String pipelineId) { checkNotNull("pipelineId", pipelineId); return pipelineByName.get(pipelineId).getPipeline(); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline); @Override voi... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public Pipeline getPipelineByName(final String pipelineId) { checkNotNull("pipelineId", pipelineId); return pipelineByName.get(pipelineId).getPipeline(); } InMemoryPipelineRegistry(); @Override void registerPipeline(final Pipeline pipeline); @Override voi... |
@Test public void testGetPipelines() { List<Pipeline> result = pipelineRegistry.getPipelines(0, 1000, PipelineRegistry.PIPELINE_NAME_SORT, true); assertTrue(result.isEmpty()); List<Pipeline> pipelines = mockPipelineList("", ELEMENTS_COUNT); pipelines.forEach(pipeline -> pipelineRegistry.registerPipeline(pipeline)); res... | @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); return sortPagedResult(values, page, pageSize, sort, sortO... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... |
@Test public void testGetProviderType() { ProviderType result = pipelineRegistry.getProviderType(PIPELINE_ID); assertNull(result); pipelineRegistry.registerPipeline(pipeline, providerType); result = pipelineRegistry.getProviderType(PIPELINE_ID); assertEquals(providerType, result); } | @Override public ProviderType getProviderType(final String pipelineId) { checkNotNull("pipelineId", pipelineId); PipelineRegistryEntry entry = pipelineByName.get(pipelineId); return entry != null ? entry.getProviderType() : null; } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public ProviderType getProviderType(final String pipelineId) { checkNotNull("pipelineId", pipelineId); PipelineRegistryEntry entry = pipelineByName.get(pipelineId); return entry != null ? entry.getProviderType() : null; } } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public ProviderType getProviderType(final String pipelineId) { checkNotNull("pipelineId", pipelineId); PipelineRegistryEntry entry = pipelineByName.get(pipelineId); return entry != null ? entry.getProviderType() : null; } InMemoryPipelineRegistry(); } | InMemoryPipelineRegistry implements PipelineRegistry { @Override public ProviderType getProviderType(final String pipelineId) { checkNotNull("pipelineId", pipelineId); PipelineRegistryEntry entry = pipelineByName.get(pipelineId); return entry != null ? entry.getProviderType() : null; } InMemoryPipelineRegistry(); @Over... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public ProviderType getProviderType(final String pipelineId) { checkNotNull("pipelineId", pipelineId); PipelineRegistryEntry entry = pipelineByName.get(pipelineId); return entry != null ? entry.getProviderType() : null; } InMemoryPipelineRegistry(); @Over... |
@Test public void getPipelinesForProvider() { ProviderType providerType1 = mockProviderTypeSPI("providerType1"); ProviderType providerType2 = mockProviderTypeSPI("providerType2"); List<Pipeline> result = pipelineRegistry.getPipelines(0, 1000, PipelineRegistry.PIPELINE_NAME_SORT, true); assertTrue(result.isEmpty()); Lis... | @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); return sortPagedResult(values, page, pageSize, sort, sortO... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... | InMemoryPipelineRegistry implements PipelineRegistry { @Override public List<Pipeline> getPipelines(final int page, final int pageSize, final String sort, final boolean sortOrder) { final List<Pipeline> values = pipelineByName.values() .stream() .map(PipelineRegistryEntry::getPipeline).collect(Collectors.toList()); ret... |
@Test public void pipelinesPagingAndSorting() { Pipeline pipe1 = mock(Pipeline.class); when(pipe1.getName()).thenReturn("pipeline 1"); Pipeline pipe2 = mock(Pipeline.class); when(pipe2.getName()).thenReturn("pipeline 2"); Pipeline pipe3 = mock(Pipeline.class); when(pipe3.getName()).thenReturn("pipeline 3"); Pipeline pi... | public static <T> List<T> pageSort(Collection<T> values, Comparator<T> comparator, Integer page, Integer pageSize, String sort, boolean sortOrder) { if (page < 0) { throw new IllegalStateException("Page must be greater or equals than 0"); } if (pageSize < 1) { throw new IllegalStateException("PageSize must be greater t... | PageSortUtil { public static <T> List<T> pageSort(Collection<T> values, Comparator<T> comparator, Integer page, Integer pageSize, String sort, boolean sortOrder) { if (page < 0) { throw new IllegalStateException("Page must be greater or equals than 0"); } if (pageSize < 1) { throw new IllegalStateException("PageSize mu... | PageSortUtil { public static <T> List<T> pageSort(Collection<T> values, Comparator<T> comparator, Integer page, Integer pageSize, String sort, boolean sortOrder) { if (page < 0) { throw new IllegalStateException("Page must be greater or equals than 0"); } if (pageSize < 1) { throw new IllegalStateException("PageSize mu... | PageSortUtil { public static <T> List<T> pageSort(Collection<T> values, Comparator<T> comparator, Integer page, Integer pageSize, String sort, boolean sortOrder) { if (page < 0) { throw new IllegalStateException("Page must be greater or equals than 0"); } if (pageSize < 1) { throw new IllegalStateException("PageSize mu... | PageSortUtil { public static <T> List<T> pageSort(Collection<T> values, Comparator<T> comparator, Integer page, Integer pageSize, String sort, boolean sortOrder) { if (page < 0) { throw new IllegalStateException("Page must be greater or equals than 0"); } if (pageSize < 1) { throw new IllegalStateException("PageSize mu... |
@Test public void testRegisterProviderType() { runtimeRegistry.registerProviderType(providerType); verifyProviderTypeIsRegistered(providerType); } | @Override public void registerProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.put(providerType, providerType); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.put(providerType, providerType); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.put(providerType, providerType); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.put(providerType, providerType); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType);... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.put(providerType, providerType); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType);... |
@Test public void testDeregisterProviderType() { runtimeRegistry.registerProviderType(providerType); verifyProviderTypeIsRegistered(providerType); runtimeRegistry.deregisterProviderType(providerType); verifyProviderTypeIsNotRegistered(providerType); } | @Override public void deregisterProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.remove(providerType); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.remove(providerType); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.remove(providerType); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.remove(providerType); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Overrid... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); providerTypes.remove(providerType); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Overrid... |
@Test @SuppressWarnings("unchecked") public void testHandleHeaderCell_NonEditableColumn() { assertThat(handler.handleHeaderCell(gridWidget, relativeLocation, 0, 0, clickEvent)).isFalse(); verify(editableHeaderMetaData, never()).edit(any(GridBodyCellEditContext.class)); } | @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridColumn<?>> gridColumns = gridWidget.getModel().getColumns(); final GridColumn<?> gridColumn = gridColumns... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... |
@Test public void testGetProviderTypes() { List<ProviderType> result = runtimeRegistry.getProviderTypes(0, 1000, RuntimeRegistry.PROVIDER_TYPE_NAME_SORT, true); assertTrue(result.isEmpty()); List<ProviderType> providerTypes = mockProviderTypeListSPI(ELEMENTS_COUNT); providerTypes.forEach(providerType -> runtimeRegistry... | @Override public List<ProviderType> getProviderTypes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<ProviderType> values = providerTypes.values(); return PageSortUtil.pageSort(values, (ProviderType pt1, ProviderType pt2) -> { switch (sort) { case PROVIDER_TYPE... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<ProviderType> getProviderTypes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<ProviderType> values = providerTypes.values(); return PageSortUtil.pageSort(values, (ProviderType pt1, Prov... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<ProviderType> getProviderTypes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<ProviderType> values = providerTypes.values(); return PageSortUtil.pageSort(values, (ProviderType pt1, Prov... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<ProviderType> getProviderTypes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<ProviderType> values = providerTypes.values(); return PageSortUtil.pageSort(values, (ProviderType pt1, Prov... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<ProviderType> getProviderTypes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<ProviderType> values = providerTypes.values(); return PageSortUtil.pageSort(values, (ProviderType pt1, Prov... |
@Test public void testRegisterProvider() { runtimeRegistry.registerProvider(provider); verifyProviderIsRegistered(provider); } | @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); providers.put(provider.getId(), provider); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); providers.put(provider.getId(), provider); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); providers.put(provider.getId(), provider); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); providers.put(provider.getId(), provider); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<Provider... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerProvider(final Provider provider) { checkNotNull("provider", provider); providers.put(provider.getId(), provider); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<Provider... |
@Test public void testDeregisterProvider() { runtimeRegistry.registerProvider(provider); verifyProviderIsRegistered(provider); runtimeRegistry.deregisterProvider(provider); verifyProviderIsNotRegistered(provider); } | @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); providers.remove(provider.getId()); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); providers.remove(provider.getId()); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); providers.remove(provider.getId()); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); providers.remove(provider.getId()); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType>... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterProvider(final Provider provider) { checkNotNull("provider", provider); providers.remove(provider.getId()); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType>... |
@Test public void testGetProviders() { List<Provider> result = runtimeRegistry.getProviders(0, 1000, RuntimeRegistry.PROVIDER_ID_SORT, true); assertTrue(result.isEmpty()); List<Provider> providers = mockProviderListSPI(providerType, ELEMENTS_COUNT); providers.forEach(provider -> runtimeRegistry.registerProvider(provide... | @Override public List<Provider> getProviders(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Provider> values = providers.values(); return PageSortUtil.pageSort(values, (Provider p1, Provider p2) -> { switch (sort) { case PROVIDER_ID_SORT: return p1.getId().com... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProviders(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Provider> values = providers.values(); return PageSortUtil.pageSort(values, (Provider p1, Provider p2) -> { switch ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProviders(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Provider> values = providers.values(); return PageSortUtil.pageSort(values, (Provider p1, Provider p2) -> { switch ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProviders(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Provider> values = providers.values(); return PageSortUtil.pageSort(values, (Provider p1, Provider p2) -> { switch ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProviders(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Provider> values = providers.values(); return PageSortUtil.pageSort(values, (Provider p1, Provider p2) -> { switch ... |
@Test public void testGetProvider() { Provider result = runtimeRegistry.getProvider(provider.getId()); assertNull(result); runtimeRegistry.registerProvider(provider); result = runtimeRegistry.getProvider(provider.getId()); assertEquals(provider, result); } | @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ... |
@Test public void testGetProvidersByType() { ProviderType providerType1 = mockProviderTypeSPI("ProviderType1"); ProviderType providerType2 = mockProviderTypeSPI("ProviderType2"); List<Provider> providers = mockProviderListSPI(providerType, "1", ELEMENTS_COUNT); List<Provider> providersForType1 = mockProviderListSPI(pro... | @Override public List<Provider> getProvidersByType(final ProviderType providerType) { checkNotNull("providerType", providerType); return providers.values().stream() .filter(provider -> providerType.equals(provider.getProviderType())) .collect(Collectors.toList()); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProvidersByType(final ProviderType providerType) { checkNotNull("providerType", providerType); return providers.values().stream() .filter(provider -> providerType.equals(provider.getProviderType())) .collect(Collectors.toList()); } ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProvidersByType(final ProviderType providerType) { checkNotNull("providerType", providerType); return providers.values().stream() .filter(provider -> providerType.equals(provider.getProviderType())) .collect(Collectors.toList()); } ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProvidersByType(final ProviderType providerType) { checkNotNull("providerType", providerType); return providers.values().stream() .filter(provider -> providerType.equals(provider.getProviderType())) .collect(Collectors.toList()); } ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Provider> getProvidersByType(final ProviderType providerType) { checkNotNull("providerType", providerType); return providers.values().stream() .filter(provider -> providerType.equals(provider.getProviderType())) .collect(Collectors.toList()); } ... |
@Test public void testRegisterRuntime() { runtimeRegistry.registerRuntime(runtime); verifyRuntimeIsRegistered(runtime); } | @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); runtimes.put(runtime.getId(), runtime); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); runtimes.put(runtime.getId(), runtime); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); runtimes.put(runtime.getId(), runtime); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); runtimes.put(runtime.getId(), runtime); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ge... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void registerRuntime(final Runtime runtime) { checkNotNull("runtime", runtime); runtimes.put(runtime.getId(), runtime); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ge... |
@Test public void testGetRuntimes() { List<Runtime> result = runtimeRegistry.getRuntimes(0, 1000, RuntimeRegistry.RUNTIME_ID_SORT, true); assertTrue(result.isEmpty()); List<Runtime> runtimes = mockRuntimeList(providerId, "", ELEMENTS_COUNT); runtimes.forEach(runtime -> runtimeRegistry.registerRuntime(runtime)); result ... | @Override public List<Runtime> getRuntimes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Runtime> values = runtimes.values(); return PageSortUtil.pageSort(values, (Runtime r1, Runtime r2) -> { switch (sort) { case RUNTIME_ID_SORT: return r1.getId().compareTo(... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Runtime> getRuntimes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Runtime> values = runtimes.values(); return PageSortUtil.pageSort(values, (Runtime r1, Runtime r2) -> { switch (sort)... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Runtime> getRuntimes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Runtime> values = runtimes.values(); return PageSortUtil.pageSort(values, (Runtime r1, Runtime r2) -> { switch (sort)... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Runtime> getRuntimes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Runtime> values = runtimes.values(); return PageSortUtil.pageSort(values, (Runtime r1, Runtime r2) -> { switch (sort)... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public List<Runtime> getRuntimes(final Integer page, final Integer pageSize, final String sort, final boolean sortOrder) { final Collection<Runtime> values = runtimes.values(); return PageSortUtil.pageSort(values, (Runtime r1, Runtime r2) -> { switch (sort)... |
@Test public void testGetRuntimeById() { String id = runtime.getId(); runtimeRegistry.registerRuntime(runtime); Runtime result = runtimeRegistry.getRuntimeById(id); assertEquals(runtime, result); } | @Override public Runtime getRuntimeById(final String runtimeId) { checkNotNull("runtimeId", runtimeId); return runtimes.get(runtimeId); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Runtime getRuntimeById(final String runtimeId) { checkNotNull("runtimeId", runtimeId); return runtimes.get(runtimeId); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Runtime getRuntimeById(final String runtimeId) { checkNotNull("runtimeId", runtimeId); return runtimes.get(runtimeId); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Runtime getRuntimeById(final String runtimeId) { checkNotNull("runtimeId", runtimeId); return runtimes.get(runtimeId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> get... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Runtime getRuntimeById(final String runtimeId) { checkNotNull("runtimeId", runtimeId); return runtimes.get(runtimeId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> get... |
@Test public void testDeregisterRuntime() { String id = runtime.getId(); RuntimeId runtimeId = mock(RuntimeId.class); when(runtimeId.getId()).thenReturn(id); runtimeRegistry.registerRuntime(runtime); verifyRuntimeIsRegistered(runtime); runtimeRegistry.deregisterRuntime(runtimeId); verifyRuntimeIsNotRegistered(runtime);... | @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); runtimes.remove(runtimeId.getId()); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); runtimes.remove(runtimeId.getId()); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); runtimes.remove(runtimeId.getId()); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); runtimes.remove(runtimeId.getId()); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderTy... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public void deregisterRuntime(final RuntimeId runtimeId) { checkNotNull("runtimeId", runtimeId); runtimes.remove(runtimeId.getId()); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderTy... |
@Test @SuppressWarnings("unchecked") public void testHandleHeaderCell_EditableColumn_NotEditableRow() { when(gridColumn.getHeaderMetaData()).thenReturn(Collections.singletonList(new BaseHeaderMetaData("column"))); assertThat(handler.handleHeaderCell(gridWidget, relativeLocation, 0, 0, clickEvent)).isFalse(); verify(edi... | @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridColumn<?>> gridColumns = gridWidget.getModel().getColumns(); final GridColumn<?> gridColumn = gridColumns... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... |
@Test public void getProvider() { MockProvider mockProvider = new MockProvider(PROVIDER_ID, providerType); ProviderId providerId = mock(ProviderId.class); when(providerId.getId()).thenReturn(PROVIDER_ID); when(providerId.getProviderType()).thenReturn(providerType); runtimeRegistry.registerProvider(mockProvider); Option... | @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); } | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ... | InMemoryRuntimeRegistry implements RuntimeRegistry { @Override public Provider getProvider(final String providerId) { checkNotNull("providerId", providerId); return providers.get(providerId); } InMemoryRuntimeRegistry(); @Override void registerProviderType(final ProviderType providerType); @Override List<ProviderType> ... |
@Test public void testRegisterRepositorySources() { sourceRegistry.registerRepositorySources(path, repository); List<Repository> result = sourceRegistry.getAllRepositories(); assertTrue(result.contains(repository)); } | @Override public void registerRepositorySources(final Path path, final Repository repo) { repositorySourcesPath.put(path, repo); pathByRepositoryId.put(repo.getId(), path); } | InMemorySourceRegistry implements SourceRegistry { @Override public void registerRepositorySources(final Path path, final Repository repo) { repositorySourcesPath.put(path, repo); pathByRepositoryId.put(repo.getId(), path); } } | InMemorySourceRegistry implements SourceRegistry { @Override public void registerRepositorySources(final Path path, final Repository repo) { repositorySourcesPath.put(path, repo); pathByRepositoryId.put(repo.getId(), path); } InMemorySourceRegistry(); } | InMemorySourceRegistry implements SourceRegistry { @Override public void registerRepositorySources(final Path path, final Repository repo) { repositorySourcesPath.put(path, repo); pathByRepositoryId.put(repo.getId(), path); } InMemorySourceRegistry(); @Override void registerRepositorySources(final Path path,
... | InMemorySourceRegistry implements SourceRegistry { @Override public void registerRepositorySources(final Path path, final Repository repo) { repositorySourcesPath.put(path, repo); pathByRepositoryId.put(repo.getId(), path); } InMemorySourceRegistry(); @Override void registerRepositorySources(final Path path,
... |
@Test public void testGetAllRepositories() { List<Repository> repositories = new ArrayList<>(); List<Path> paths = new ArrayList<>(); for (int i = 0; i < REPOSITORIES_SIZE; i++) { paths.add(mock(Path.class)); Repository repository = mock(Repository.class); when(repository.getId()).thenReturn(REPOSITORY_ID + Integer.toS... | @Override public List<Repository> getAllRepositories() { return new ArrayList<>(repositorySourcesPath.values()); } | InMemorySourceRegistry implements SourceRegistry { @Override public List<Repository> getAllRepositories() { return new ArrayList<>(repositorySourcesPath.values()); } } | InMemorySourceRegistry implements SourceRegistry { @Override public List<Repository> getAllRepositories() { return new ArrayList<>(repositorySourcesPath.values()); } InMemorySourceRegistry(); } | InMemorySourceRegistry implements SourceRegistry { @Override public List<Repository> getAllRepositories() { return new ArrayList<>(repositorySourcesPath.values()); } InMemorySourceRegistry(); @Override void registerRepositorySources(final Path path,
final Repository repo); @Ove... | InMemorySourceRegistry implements SourceRegistry { @Override public List<Repository> getAllRepositories() { return new ArrayList<>(repositorySourcesPath.values()); } InMemorySourceRegistry(); @Override void registerRepositorySources(final Path path,
final Repository repo); @Ove... |
@Test public void registerBinary() { Binary binary = mock(Binary.class); when(binary.getName()).thenReturn(BINARY_NAME); buildRegistry.registerBinary(binary); List<Binary> result = buildRegistry.getAllBinaries(); assertTrue(result.contains(binary)); } | @Override public void registerBinary(final Binary binary) { binariesByName.put(binary.getName(), binary); } | InMemoryBuildRegistry implements BuildRegistry { @Override public void registerBinary(final Binary binary) { binariesByName.put(binary.getName(), binary); } } | InMemoryBuildRegistry implements BuildRegistry { @Override public void registerBinary(final Binary binary) { binariesByName.put(binary.getName(), binary); } InMemoryBuildRegistry(); } | InMemoryBuildRegistry implements BuildRegistry { @Override public void registerBinary(final Binary binary) { binariesByName.put(binary.getName(), binary); } InMemoryBuildRegistry(); @Override void registerBinary(final Binary binary); @Override List<Binary> getAllBinaries(); } | InMemoryBuildRegistry implements BuildRegistry { @Override public void registerBinary(final Binary binary) { binariesByName.put(binary.getName(), binary); } InMemoryBuildRegistry(); @Override void registerBinary(final Binary binary); @Override List<Binary> getAllBinaries(); } |
@Test public void testGetAllBinaries() { List<Binary> binaries = new ArrayList<>(); for (int i = 0; i < BINARIES_COUNT; i++) { Binary binary = mock(Binary.class); when(binary.getName()).thenReturn(BINARY_NAME + Integer.toString(i)); binaries.add(binary); } binaries.forEach(binary -> buildRegistry.registerBinary(binary)... | @Override public List<Binary> getAllBinaries() { return new ArrayList<>(binariesByName.values()); } | InMemoryBuildRegistry implements BuildRegistry { @Override public List<Binary> getAllBinaries() { return new ArrayList<>(binariesByName.values()); } } | InMemoryBuildRegistry implements BuildRegistry { @Override public List<Binary> getAllBinaries() { return new ArrayList<>(binariesByName.values()); } InMemoryBuildRegistry(); } | InMemoryBuildRegistry implements BuildRegistry { @Override public List<Binary> getAllBinaries() { return new ArrayList<>(binariesByName.values()); } InMemoryBuildRegistry(); @Override void registerBinary(final Binary binary); @Override List<Binary> getAllBinaries(); } | InMemoryBuildRegistry implements BuildRegistry { @Override public List<Binary> getAllBinaries() { return new ArrayList<>(binariesByName.values()); } InMemoryBuildRegistry(); @Override void registerBinary(final Binary binary); @Override List<Binary> getAllBinaries(); } |
@Test public void testMatches() { String criteria = DiagramLookupRequest.CRITERIA_NAME + "=" + NAME; String criteria1 = DiagramLookupRequest.CRITERIA_NAME + "=" + "name2"; String criteria2 = ""; assertTrue(tested.matches(criteria, diagram)); assertFalse(tested.matches(criteria1, diagram)); assertTrue(tested.matches(cri... | @Override protected boolean matches(final String criteria, final Diagram<Graph, Metadata> item) { final Map<String, String> criteriaMap = AbstractCriteriaLookupManager.parseCriteria(criteria); final String name = criteriaMap.get(DiagramLookupRequest.CRITERIA_NAME); if (null != name && name.trim().length() > 0) { return... | DiagramLookupServiceImpl extends AbstractDiagramLookupService<Metadata, Diagram<Graph, Metadata>> { @Override protected boolean matches(final String criteria, final Diagram<Graph, Metadata> item) { final Map<String, String> criteriaMap = AbstractCriteriaLookupManager.parseCriteria(criteria); final String name = criteri... | DiagramLookupServiceImpl extends AbstractDiagramLookupService<Metadata, Diagram<Graph, Metadata>> { @Override protected boolean matches(final String criteria, final Diagram<Graph, Metadata> item) { final Map<String, String> criteriaMap = AbstractCriteriaLookupManager.parseCriteria(criteria); final String name = criteri... | DiagramLookupServiceImpl extends AbstractDiagramLookupService<Metadata, Diagram<Graph, Metadata>> { @Override protected boolean matches(final String criteria, final Diagram<Graph, Metadata> item) { final Map<String, String> criteriaMap = AbstractCriteriaLookupManager.parseCriteria(criteria); final String name = criteri... | DiagramLookupServiceImpl extends AbstractDiagramLookupService<Metadata, Diagram<Graph, Metadata>> { @Override protected boolean matches(final String criteria, final Diagram<Graph, Metadata> item) { final Map<String, String> criteriaMap = AbstractCriteriaLookupManager.parseCriteria(criteria); final String name = criteri... |
@Test public void testNameAndIdAsFileName() throws IOException { when(definitionManager.definitionSets()).thenReturn(definitionSetRegistry); when(backendService.getDiagramMarshaller()).thenReturn(marshaller); when(marshaller.unmarshall(any(), any())).thenReturn(graph); when(graph.nodes()).thenReturn(nodes); when(backen... | @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } } | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... |
@Test public void testNameAndIdAsXML() throws IOException { when(definitionManager.definitionSets()).thenReturn(definitionSetRegistry); when(backendService.getDiagramMarshaller()).thenReturn(marshaller); when(marshaller.unmarshall(any(), any())).thenReturn(graph); when(graph.nodes()).thenReturn(nodes); when(backendServ... | @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } } | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... | BPMNStandaloneDiagramServiceImpl implements KogitoDiagramService { @Override public Diagram transform(final String xml) { if (Objects.isNull(xml) || xml.isEmpty()) { return doNewDiagram(); } return doTransformation(DEFAULT_PROCESS_ID, xml); } protected BPMNStandaloneDiagramServiceImpl(); @Inject BPMNStandaloneDiagram... |
@Test public void testView() { assertEquals(view, tested.getWidget()); } | @WorkbenchPartView public IsWidget getWidget() { return view; } | DiagramEditorExplorerScreen { @WorkbenchPartView public IsWidget getWidget() { return view; } } | DiagramEditorExplorerScreen { @WorkbenchPartView public IsWidget getWidget() { return view; } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... | DiagramEditorExplorerScreen { @WorkbenchPartView public IsWidget getWidget() { return view; } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... | DiagramEditorExplorerScreen { @WorkbenchPartView public IsWidget getWidget() { return view; } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... |
@Test @SuppressWarnings("unchecked") public void testShow() { tested.show(session); verify(sessionPreview, times(1)).open(eq(session), anyInt(), anyInt(), any(SessionViewer.SessionViewerCallback.class)); verify(treeExplorer, times(1)).show(eq(canvasHandler)); verify(changeTitleNotificationEvent, times(1)).fire(any(Chan... | public void show(final ClientSession session) { if (null != session.getCanvasHandler().getDiagram()) { showPreview(session); showExplorer(session); updateTitle(session); } } | DiagramEditorExplorerScreen { public void show(final ClientSession session) { if (null != session.getCanvasHandler().getDiagram()) { showPreview(session); showExplorer(session); updateTitle(session); } } } | DiagramEditorExplorerScreen { public void show(final ClientSession session) { if (null != session.getCanvasHandler().getDiagram()) { showPreview(session); showExplorer(session); updateTitle(session); } } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionMan... | DiagramEditorExplorerScreen { public void show(final ClientSession session) { if (null != session.getCanvasHandler().getDiagram()) { showPreview(session); showExplorer(session); updateTitle(session); } } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionMan... | DiagramEditorExplorerScreen { public void show(final ClientSession session) { if (null != session.getCanvasHandler().getDiagram()) { showPreview(session); showExplorer(session); updateTitle(session); } } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionMan... |
@Test @SuppressWarnings("unchecked") public void testHandleHeaderCell_EditableColumn_EditableRow_DoubleClickEvent() { when(gridColumn.getHeaderMetaData()).thenReturn(Collections.singletonList(editableHeaderMetaData)); uiModel.selectHeaderCell(0, 0); assertThat(handler.handleHeaderCell(gridWidget, relativeLocation, 0, 0... | @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridColumn<?>> gridColumns = gridWidget.getModel().getColumns(); final GridColumn<?> gridColumn = gridColumns... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... | EditableHeaderGridWidgetEditCellMouseEventHandler extends DefaultGridWidgetEditCellMouseEventHandler { @Override public boolean handleHeaderCell(final GridWidget gridWidget, final Point2D relativeLocation, final int uiHeaderRowIndex, final int uiHeaderColumnIndex, final AbstractNodeMouseEvent event) { final List<GridCo... |
@Test @SuppressWarnings("unchecked") public void testClose() { tested.show(session); tested.close(); verify(sessionPreview, times(1)).destroy(); } | public void close() { closeTreeExplorer(); closePreview(); } | DiagramEditorExplorerScreen { public void close() { closeTreeExplorer(); closePreview(); } } | DiagramEditorExplorerScreen { public void close() { closeTreeExplorer(); closePreview(); } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... | DiagramEditorExplorerScreen { public void close() { closeTreeExplorer(); closePreview(); } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... | DiagramEditorExplorerScreen { public void close() { closeTreeExplorer(); closePreview(); } protected DiagramEditorExplorerScreen(); @Inject DiagramEditorExplorerScreen(final SessionManager clientSessionManager,
final @Any ManagedInstance<TreeExplorer> treeExplorers,
... |
@Test public void testInit() { editorSessionCommands.init(); final InOrder inOrder = inOrder(commands); inOrder.verify(commands).register(VisitGraphSessionCommand.class); inOrder.verify(commands).register(SwitchGridSessionCommand.class); inOrder.verify(commands).register(ClearSessionCommand.class); inOrder.verify(comma... | @PostConstruct public void init() { registerCommands(); } | EditorSessionCommands { @PostConstruct public void init() { registerCommands(); } } | EditorSessionCommands { @PostConstruct public void init() { registerCommands(); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { @PostConstruct public void init() { registerCommands(); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getCommands(); VisitGraphSessionCommand getVisi... | EditorSessionCommands { @PostConstruct public void init() { registerCommands(); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getCommands(); VisitGraphSessionCommand getVisi... |
@Test public void testBind() { editorSessionCommands.bind(session); verify(commands).bind(session); } | public EditorSessionCommands bind(final ClientSession session) { commands.bind(session); return this; } | EditorSessionCommands { public EditorSessionCommands bind(final ClientSession session) { commands.bind(session); return this; } } | EditorSessionCommands { public EditorSessionCommands bind(final ClientSession session) { commands.bind(session); return this; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public EditorSessionCommands bind(final ClientSession session) { commands.bind(session); return this; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands g... | EditorSessionCommands { public EditorSessionCommands bind(final ClientSession session) { commands.bind(session); return this; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands g... |
@Test public void testGetCommands() { assertEquals(commands, editorSessionCommands.getCommands()); } | public ManagedClientSessionCommands getCommands() { return commands; } | EditorSessionCommands { public ManagedClientSessionCommands getCommands() { return commands; } } | EditorSessionCommands { public ManagedClientSessionCommands getCommands() { return commands; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ManagedClientSessionCommands getCommands() { return commands; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getCommands(); VisitGraphSessionCo... | EditorSessionCommands { public ManagedClientSessionCommands getCommands() { return commands; } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getCommands(); VisitGraphSessionCo... |
@Test public void testGetVisitGraphSessionCommand() { editorSessionCommands.getVisitGraphSessionCommand(); verify(commands).get(eq(VisitGraphSessionCommand.class)); } | public VisitGraphSessionCommand getVisitGraphSessionCommand() { return commands.get(VisitGraphSessionCommand.class); } | EditorSessionCommands { public VisitGraphSessionCommand getVisitGraphSessionCommand() { return commands.get(VisitGraphSessionCommand.class); } } | EditorSessionCommands { public VisitGraphSessionCommand getVisitGraphSessionCommand() { return commands.get(VisitGraphSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public VisitGraphSessionCommand getVisitGraphSessionCommand() { return commands.get(VisitGraphSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSe... | EditorSessionCommands { public VisitGraphSessionCommand getVisitGraphSessionCommand() { return commands.get(VisitGraphSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSe... |
@Test public void testGetSwitchGridSessionCommand() { editorSessionCommands.getSwitchGridSessionCommand(); verify(commands).get(eq(SwitchGridSessionCommand.class)); } | public SwitchGridSessionCommand getSwitchGridSessionCommand() { return commands.get(SwitchGridSessionCommand.class); } | EditorSessionCommands { public SwitchGridSessionCommand getSwitchGridSessionCommand() { return commands.get(SwitchGridSessionCommand.class); } } | EditorSessionCommands { public SwitchGridSessionCommand getSwitchGridSessionCommand() { return commands.get(SwitchGridSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public SwitchGridSessionCommand getSwitchGridSessionCommand() { return commands.get(SwitchGridSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSe... | EditorSessionCommands { public SwitchGridSessionCommand getSwitchGridSessionCommand() { return commands.get(SwitchGridSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSe... |
@Test public void testGetClearSessionCommand() { editorSessionCommands.getClearSessionCommand(); verify(commands).get(eq(ClearSessionCommand.class)); } | public ClearSessionCommand getClearSessionCommand() { return commands.get(ClearSessionCommand.class); } | EditorSessionCommands { public ClearSessionCommand getClearSessionCommand() { return commands.get(ClearSessionCommand.class); } } | EditorSessionCommands { public ClearSessionCommand getClearSessionCommand() { return commands.get(ClearSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ClearSessionCommand getClearSessionCommand() { return commands.get(ClearSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands g... | EditorSessionCommands { public ClearSessionCommand getClearSessionCommand() { return commands.get(ClearSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands g... |
@Test public void testGetDeleteSelectionSessionCommand() { editorSessionCommands.getDeleteSelectionSessionCommand(); verify(commands).get(eq(DeleteSelectionSessionCommand.class)); } | public DeleteSelectionSessionCommand getDeleteSelectionSessionCommand() { return commands.get(DeleteSelectionSessionCommand.class); } | EditorSessionCommands { public DeleteSelectionSessionCommand getDeleteSelectionSessionCommand() { return commands.get(DeleteSelectionSessionCommand.class); } } | EditorSessionCommands { public DeleteSelectionSessionCommand getDeleteSelectionSessionCommand() { return commands.get(DeleteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public DeleteSelectionSessionCommand getDeleteSelectionSessionCommand() { return commands.get(DeleteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ... | EditorSessionCommands { public DeleteSelectionSessionCommand getDeleteSelectionSessionCommand() { return commands.get(DeleteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ... |
@Test public void testGetUndoSessionCommand() { editorSessionCommands.getUndoSessionCommand(); verify(commands).get(eq(UndoSessionCommand.class)); } | public UndoSessionCommand getUndoSessionCommand() { return commands.get(UndoSessionCommand.class); } | EditorSessionCommands { public UndoSessionCommand getUndoSessionCommand() { return commands.get(UndoSessionCommand.class); } } | EditorSessionCommands { public UndoSessionCommand getUndoSessionCommand() { return commands.get(UndoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public UndoSessionCommand getUndoSessionCommand() { return commands.get(UndoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getC... | EditorSessionCommands { public UndoSessionCommand getUndoSessionCommand() { return commands.get(UndoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getC... |
@Test public void testGetRedoSessionCommand() { editorSessionCommands.getRedoSessionCommand(); verify(commands).get(eq(RedoSessionCommand.class)); } | public RedoSessionCommand getRedoSessionCommand() { return commands.get(RedoSessionCommand.class); } | EditorSessionCommands { public RedoSessionCommand getRedoSessionCommand() { return commands.get(RedoSessionCommand.class); } } | EditorSessionCommands { public RedoSessionCommand getRedoSessionCommand() { return commands.get(RedoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public RedoSessionCommand getRedoSessionCommand() { return commands.get(RedoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getC... | EditorSessionCommands { public RedoSessionCommand getRedoSessionCommand() { return commands.get(RedoSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionCommands getC... |
@Test public void testOnNodeMouseEventWhenNestedOnHeader() { setupGrid(() -> parent, () -> 1); uiHeaderRowIndex = Optional.of(0); uiHeaderColumnIndex = Optional.of(1); uiRowIndex = Optional.empty(); uiColumnIndex = Optional.empty(); assertThat(handler.onNodeMouseEvent(gridWidget, relativeLocation, uiHeaderRowIndex, uiH... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (nestingSuppli... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... |
@Test public void testGetValidateSessionCommand() { editorSessionCommands.getValidateSessionCommand(); verify(commands).get(eq(ValidateSessionCommand.class)); } | public ValidateSessionCommand getValidateSessionCommand() { return commands.get(ValidateSessionCommand.class); } | EditorSessionCommands { public ValidateSessionCommand getValidateSessionCommand() { return commands.get(ValidateSessionCommand.class); } } | EditorSessionCommands { public ValidateSessionCommand getValidateSessionCommand() { return commands.get(ValidateSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ValidateSessionCommand getValidateSessionCommand() { return commands.get(ValidateSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionC... | EditorSessionCommands { public ValidateSessionCommand getValidateSessionCommand() { return commands.get(ValidateSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClientSessionC... |
@Test public void testGetExportToPngSessionCommand() { editorSessionCommands.getExportToPngSessionCommand(); verify(commands).get(eq(ExportToPngSessionCommand.class)); } | public ExportToPngSessionCommand getExportToPngSessionCommand() { return commands.get(ExportToPngSessionCommand.class); } | EditorSessionCommands { public ExportToPngSessionCommand getExportToPngSessionCommand() { return commands.get(ExportToPngSessionCommand.class); } } | EditorSessionCommands { public ExportToPngSessionCommand getExportToPngSessionCommand() { return commands.get(ExportToPngSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ExportToPngSessionCommand getExportToPngSessionCommand() { return commands.get(ExportToPngSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... | EditorSessionCommands { public ExportToPngSessionCommand getExportToPngSessionCommand() { return commands.get(ExportToPngSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... |
@Test public void testGetExportToJpgSessionCommand() { editorSessionCommands.getExportToJpgSessionCommand(); verify(commands).get(eq(ExportToJpgSessionCommand.class)); } | public ExportToJpgSessionCommand getExportToJpgSessionCommand() { return commands.get(ExportToJpgSessionCommand.class); } | EditorSessionCommands { public ExportToJpgSessionCommand getExportToJpgSessionCommand() { return commands.get(ExportToJpgSessionCommand.class); } } | EditorSessionCommands { public ExportToJpgSessionCommand getExportToJpgSessionCommand() { return commands.get(ExportToJpgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ExportToJpgSessionCommand getExportToJpgSessionCommand() { return commands.get(ExportToJpgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... | EditorSessionCommands { public ExportToJpgSessionCommand getExportToJpgSessionCommand() { return commands.get(ExportToJpgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... |
@Test public void testGetExportToPdfSessionCommand() { editorSessionCommands.getExportToPdfSessionCommand(); verify(commands).get(eq(ExportToPdfSessionCommand.class)); } | public ExportToPdfSessionCommand getExportToPdfSessionCommand() { return commands.get(ExportToPdfSessionCommand.class); } | EditorSessionCommands { public ExportToPdfSessionCommand getExportToPdfSessionCommand() { return commands.get(ExportToPdfSessionCommand.class); } } | EditorSessionCommands { public ExportToPdfSessionCommand getExportToPdfSessionCommand() { return commands.get(ExportToPdfSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ExportToPdfSessionCommand getExportToPdfSessionCommand() { return commands.get(ExportToPdfSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... | EditorSessionCommands { public ExportToPdfSessionCommand getExportToPdfSessionCommand() { return commands.get(ExportToPdfSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... |
@Test public void testGetExportToSvgSessionCommand() { editorSessionCommands.getExportToSvgSessionCommand(); verify(commands).get(eq(ExportToSvgSessionCommand.class)); } | public ExportToSvgSessionCommand getExportToSvgSessionCommand() { return commands.get(ExportToSvgSessionCommand.class); } | EditorSessionCommands { public ExportToSvgSessionCommand getExportToSvgSessionCommand() { return commands.get(ExportToSvgSessionCommand.class); } } | EditorSessionCommands { public ExportToSvgSessionCommand getExportToSvgSessionCommand() { return commands.get(ExportToSvgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public ExportToSvgSessionCommand getExportToSvgSessionCommand() { return commands.get(ExportToSvgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... | EditorSessionCommands { public ExportToSvgSessionCommand getExportToSvgSessionCommand() { return commands.get(ExportToSvgSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... |
@Test public void testGetCopySelectionSessionCommand() { editorSessionCommands.getCopySelectionSessionCommand(); verify(commands).get(eq(CopySelectionSessionCommand.class)); } | public CopySelectionSessionCommand getCopySelectionSessionCommand() { return commands.get(CopySelectionSessionCommand.class); } | EditorSessionCommands { public CopySelectionSessionCommand getCopySelectionSessionCommand() { return commands.get(CopySelectionSessionCommand.class); } } | EditorSessionCommands { public CopySelectionSessionCommand getCopySelectionSessionCommand() { return commands.get(CopySelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public CopySelectionSessionCommand getCopySelectionSessionCommand() { return commands.get(CopySelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); Manage... | EditorSessionCommands { public CopySelectionSessionCommand getCopySelectionSessionCommand() { return commands.get(CopySelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); Manage... |
@Test public void testGetPasteSelectionSessionCommand() { editorSessionCommands.getPasteSelectionSessionCommand(); verify(commands).get(eq(PasteSelectionSessionCommand.class)); } | public PasteSelectionSessionCommand getPasteSelectionSessionCommand() { return commands.get(PasteSelectionSessionCommand.class); } | EditorSessionCommands { public PasteSelectionSessionCommand getPasteSelectionSessionCommand() { return commands.get(PasteSelectionSessionCommand.class); } } | EditorSessionCommands { public PasteSelectionSessionCommand getPasteSelectionSessionCommand() { return commands.get(PasteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public PasteSelectionSessionCommand getPasteSelectionSessionCommand() { return commands.get(PasteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); Man... | EditorSessionCommands { public PasteSelectionSessionCommand getPasteSelectionSessionCommand() { return commands.get(PasteSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); Man... |
@Test public void testGetCutSelectionSessionCommand() { editorSessionCommands.getCutSelectionSessionCommand(); verify(commands).get(eq(CutSelectionSessionCommand.class)); } | public CutSelectionSessionCommand getCutSelectionSessionCommand() { return commands.get(CutSelectionSessionCommand.class); } | EditorSessionCommands { public CutSelectionSessionCommand getCutSelectionSessionCommand() { return commands.get(CutSelectionSessionCommand.class); } } | EditorSessionCommands { public CutSelectionSessionCommand getCutSelectionSessionCommand() { return commands.get(CutSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public CutSelectionSessionCommand getCutSelectionSessionCommand() { return commands.get(CutSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedCl... | EditorSessionCommands { public CutSelectionSessionCommand getCutSelectionSessionCommand() { return commands.get(CutSelectionSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedCl... |
@Test public void testGetSaveDiagramSessionCommand() { editorSessionCommands.getSaveDiagramSessionCommand(); verify(commands).get(eq(SaveDiagramSessionCommand.class)); } | public SaveDiagramSessionCommand getSaveDiagramSessionCommand() { return commands.get(SaveDiagramSessionCommand.class); } | EditorSessionCommands { public SaveDiagramSessionCommand getSaveDiagramSessionCommand() { return commands.get(SaveDiagramSessionCommand.class); } } | EditorSessionCommands { public SaveDiagramSessionCommand getSaveDiagramSessionCommand() { return commands.get(SaveDiagramSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); } | EditorSessionCommands { public SaveDiagramSessionCommand getSaveDiagramSessionCommand() { return commands.get(SaveDiagramSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... | EditorSessionCommands { public SaveDiagramSessionCommand getSaveDiagramSessionCommand() { return commands.get(SaveDiagramSessionCommand.class); } @Inject EditorSessionCommands(final ManagedClientSessionCommands commands); @PostConstruct void init(); EditorSessionCommands bind(final ClientSession session); ManagedClien... |
@Test public void testSetWidget() { tested.setWidget(widget); verify(widgetPanel, times(1)).clear(); verify(widgetPanel, times(1)).add(any(IsWidget.class)); } | @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField F... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField F... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField F... |
@Test public void testOnNodeMouseEventWhenNestedOnBodyWithoutSelectionChange() { when(event.isShiftKeyDown()).thenReturn(false); when(event.isControlKeyDown()).thenReturn(true); when(parentCellSelectionManager.selectCell(anyInt(), anyInt(), anyBoolean(), anyBoolean())).thenReturn(false); setupGrid(() -> parent, () -> 1... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (nestingSuppli... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... |
@Test public void testShowLoading() { tested.showLoading(); verify(widgetPanel, times(1)).setVisible(eq(false)); verify(loadingPanel, times(1)).setVisible(eq(true)); } | @Override public DiagramEditorScreenView showLoading() { widgetPanel.setVisible(false); loadingPanel.setVisible(true); return this; } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView showLoading() { widgetPanel.setVisible(false); loadingPanel.setVisible(true); return this; } } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView showLoading() { widgetPanel.setVisible(false); loadingPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView showLoading() { widgetPanel.setVisible(false); loadingPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView showLoading() { widgetPanel.setVisible(false); loadingPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... |
@Test public void testHideLoading() { tested.hideLoading(); verify(loadingPanel, times(1)).setVisible(eq(false)); verify(widgetPanel, times(1)).setVisible(eq(true)); } | @Override public DiagramEditorScreenView hideLoading() { loadingPanel.setVisible(false); widgetPanel.setVisible(true); return this; } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView hideLoading() { loadingPanel.setVisible(false); widgetPanel.setVisible(true); return this; } } | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView hideLoading() { loadingPanel.setVisible(false); widgetPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView hideLoading() { loadingPanel.setVisible(false); widgetPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... | DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
IsElement { @Override public DiagramEditorScreenView hideLoading() { loadingPanel.setVisible(false); widgetPanel.setVisible(true); return this; } @Inject DiagramEditorScreenViewImpl(final @DataField Flow... |
@Test public void loadingStarts() { final Command loadingStarts = mock(Command.class); new ValidationAction(editorSessionCommands, loadingStarts, () -> { }, s -> { }).validate(); verify(loadingStarts).execute(); verify(validateSessionCommand).execute(any()); } | public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess() { loadingComplet... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... |
@Test public void loadingCompletedOnSuccess() { final Command loadingCompleted = mock(Command.class); new ValidationAction(editorSessionCommands, () -> { }, loadingCompleted, s -> { }).validate(); verify(validateSessionCommand).execute(violationsArgumentCapture.capture()); violationsArgumentCapture.getValue().onSuccess... | public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess() { loadingComplet... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... |
@Test public void loadingCompletedOnError() { final Command loadingCompleted = mock(Command.class); final Consumer onError = mock(Consumer.class); new ValidationAction(editorSessionCommands, () -> { }, loadingCompleted, onError).validate(); verify(validateSessionCommand).execute(violationsArgumentCapture.capture()); vi... | public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess() { loadingComplet... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... |
@Test public void preventValidationSpam() { final ValidationAction validationAction = new ValidationAction(editorSessionCommands, () -> { }, () -> { }, s -> { }); validationAction.validate(); validationAction.validate(); validationAction.validate(); verify(validateSessionCommand).execute(violationsArgumentCapture.captu... | public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess() { loadingComplet... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... | ValidationAction { public void validate() { if (!isValidationRunning && onBeforeValidate()) { isValidationRunning = true; loadingStarts.execute(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess... |
@Test public void testSetWidget() { final IsWidget editor = mock(IsWidget.class); tested.setWidget(editor); verify(editorPanel).clear(); verify(editorPanel).add(eq(editor)); } | @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); @Override void init(final DiagramEd... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); @Override void init(final DiagramEd... |
@Test public void testOnResize() { tested.onResize(); verify(editorPanel).onResize(); } | @Override public void onResize() { editorPanel.onResize(); } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void onResize() { editorPanel.onResize(); } } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void onResize() { editorPanel.onResize(); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); } | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void onResize() { editorPanel.onResize(); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); @Override void init(final DiagramEditorCore presenter); @Override void onResize... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void onResize() { editorPanel.onResize(); } protected DiagramEditorView(); @Inject DiagramEditorView(final ResizeFlowPanel editorPanel); @Override void init(final DiagramEditorCore presenter); @Override void onResize... |
@Test public void testOnAttach() { testOnAttach(true); testOnAttach(false); } | @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setDisplay(Style.Display.... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, ... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, ... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, ... | DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, ... |
@Test @SuppressWarnings("unchecked") public void testEqualsWhenProjectDiagramIsDifferent() { final DiagramImpl projectDiagram1 = new DiagramImpl("Diagram", makeGraph(), makeMetadata()); final DiagramImpl projectDiagram2 = new DiagramImpl("Diagram_", makeGraph(), makeMetadata()); final KogitoDiagramResourceImpl projectD... | @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(projectDiagram), Objects.hashCode(xmlDiagram), Objects.hashCode(type)); } | KogitoDiagramResourceImpl implements KogitoDiagramResource<Diagram> { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(projectDiagram), Objects.hashCode(xmlDiagram), Objects.hashCode(type)); } } | KogitoDiagramResourceImpl implements KogitoDiagramResource<Diagram> { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(projectDiagram), Objects.hashCode(xmlDiagram), Objects.hashCode(type)); } KogitoDiagramResourceImpl(final @MapsTo("projectDiagram") Diagram projectDiagram,
... | KogitoDiagramResourceImpl implements KogitoDiagramResource<Diagram> { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(projectDiagram), Objects.hashCode(xmlDiagram), Objects.hashCode(type)); } KogitoDiagramResourceImpl(final @MapsTo("projectDiagram") Diagram projectDiagram,
... | KogitoDiagramResourceImpl implements KogitoDiagramResource<Diagram> { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(projectDiagram), Objects.hashCode(xmlDiagram), Objects.hashCode(type)); } KogitoDiagramResourceImpl(final @MapsTo("projectDiagram") Diagram projectDiagram,
... |
@Test public void testOnNodeMouseEventWhenNestedOnBodyWithSelectionChange() { when(event.isShiftKeyDown()).thenReturn(false); when(event.isControlKeyDown()).thenReturn(true); when(parentGridWidget.isSelected()).thenReturn(false); when(parentCellSelectionManager.selectCell(anyInt(), anyInt(), anyBoolean(), anyBoolean())... | @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer> uiRowIndex, final Optional<Integer> uiColumnIndex, final AbstractNodeMouseEvent event) { if (nestingSuppli... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... | DelegatingGridWidgetCellSelectorMouseEventHandler extends DefaultGridWidgetCellSelectorMouseEventHandler { @Override public boolean onNodeMouseEvent(final GridWidget gridWidget, final Point2D relativeLocation, final Optional<Integer> uiHeaderRowIndex, final Optional<Integer> uiHeaderColumnIndex, final Optional<Integer>... |
@Test public void testGetImportXML() throws java.io.IOException { final String xml1 = "<some xml/>"; final String xml2 = "<some other xml/>"; final Metadata metadata = mock(Metadata.class); final Import import1 = mock(Import.class); final Path path1 = makePath("../file1.dmn"); final Path path2 = makePath("../file2.dmn"... | @Override public Map<Import, String> getImportXML(final Metadata metadata, final List<Import> imports) { final Map<Import, String> importXML = new HashMap<>(); if (imports.size() > 0) { for (final String xml : getOtherDMNDiagramsXML(metadata)) { try (final StringReader sr = toStringReader(xml)) { final Definitions defi... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { @Override public Map<Import, String> getImportXML(final Metadata metadata, final List<Import> imports) { final Map<Import, String> importXML = new HashMap<>(); if (imports.size() > 0) { for (final String xml : getOtherDMNDiagrams... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { @Override public Map<Import, String> getImportXML(final Metadata metadata, final List<Import> imports) { final Map<Import, String> importXML = new HashMap<>(); if (imports.size() > 0) { for (final String xml : getOtherDMNDiagrams... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { @Override public Map<Import, String> getImportXML(final Metadata metadata, final List<Import> imports) { final Map<Import, String> importXML = new HashMap<>(); if (imports.size() > 0) { for (final String xml : getOtherDMNDiagrams... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { @Override public Map<Import, String> getImportXML(final Metadata metadata, final List<Import> imports) { final Map<Import, String> importXML = new HashMap<>(); if (imports.size() > 0) { for (final String xml : getOtherDMNDiagrams... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.