@Test public void testGetSelectorData() { SelectorData selectorData = provider.getSelectorData(context); assertNotNull(selectorData.getValues()); assertEquals(2, selectorData.getValues().size()); assertEquals(ExecutionOrder.SEQUENTIAL.value(), selectorData.getSelectedValue()); assertEquals(SEQUENTIAL_LABEL, selectorData.getValues().get(ExecutionOrder.SEQUENTIAL.value())); assertEquals(PARALLEL_LABEL, selectorData.getValues().get(ExecutionOrder.PARALLEL.value())); }
@Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getValue(scope.i18nKey()))); return new SelectorData(values, DataProviderOption.SEQUENTIAL.value()); }
ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getValue(scope.i18nKey()))); return new SelectorData(values, DataProviderOption.SEQUENTIAL.value()); } }
ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getValue(scope.i18nKey()))); return new SelectorData(values, DataProviderOption.SEQUENTIAL.value()); } @Inject  ExecutionOrderProvider(final ClientTranslationService translationService); }
ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getValue(scope.i18nKey()))); return new SelectorData(values, DataProviderOption.SEQUENTIAL.value()); } @Inject  ExecutionOrderProvider(final ClientTranslationService translationService); @Override String getProviderName(); @Override @SuppressWarnings("unchecked") SelectorData getSelectorData(final FormRenderingContext context); }
ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getValue(scope.i18nKey()))); return new SelectorData(values, DataProviderOption.SEQUENTIAL.value()); } @Inject  ExecutionOrderProvider(final ClientTranslationService translationService); @Override String getProviderName(); @Override @SuppressWarnings("unchecked") SelectorData getSelectorData(final FormRenderingContext context);  }