@Test public void testSetDataProvider() { @SuppressWarnings("unchecked") BiConsumer<HasItems<?>, ListDataProvider<Object>> dataProviderSetter = mock(BiConsumer.class); AvailableValuesAspectDefinition<HasItems<?>> availableValuesAspectDefinition = new AvailableValuesAspectDefinition<>( AvailableValuesType.DYNAMIC, dataProviderSetter); @SuppressWarnings("unchecked") ListDataProvider<Object> dataProvider = mock(ListDataProvider.class); ComboBox<Object> component = new ComboBox<>(); availableValuesAspectDefinition.setDataProvider(new LabelComponentWrapper(component), dataProvider); verify(dataProviderSetter).accept(component, dataProvider); }
@SuppressWarnings("unchecked") protected void setDataProvider(ComponentWrapper componentWrapper, ListDataProvider<Object> dataProvider) { dataProviderSetter.accept((C)componentWrapper.getComponent(), dataProvider); }
AvailableValuesAspectDefinition implements LinkkiAspectDefinition { @SuppressWarnings("unchecked") protected void setDataProvider(ComponentWrapper componentWrapper, ListDataProvider<Object> dataProvider) { dataProviderSetter.accept((C)componentWrapper.getComponent(), dataProvider); } }
AvailableValuesAspectDefinition implements LinkkiAspectDefinition { @SuppressWarnings("unchecked") protected void setDataProvider(ComponentWrapper componentWrapper, ListDataProvider<Object> dataProvider) { dataProviderSetter.accept((C)componentWrapper.getComponent(), dataProvider); } AvailableValuesAspectDefinition(AvailableValuesType availableValuesType,
            BiConsumer<C, ListDataProvider<Object>> dataProviderSetter); }
AvailableValuesAspectDefinition implements LinkkiAspectDefinition { @SuppressWarnings("unchecked") protected void setDataProvider(ComponentWrapper componentWrapper, ListDataProvider<Object> dataProvider) { dataProviderSetter.accept((C)componentWrapper.getComponent(), dataProvider); } AvailableValuesAspectDefinition(AvailableValuesType availableValuesType,
            BiConsumer<C, ListDataProvider<Object>> dataProviderSetter); @Override Handler createUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper); Aspect<Collection<?>> createAspect(String propertyName, Class<?> valueClass); }
AvailableValuesAspectDefinition implements LinkkiAspectDefinition { @SuppressWarnings("unchecked") protected void setDataProvider(ComponentWrapper componentWrapper, ListDataProvider<Object> dataProvider) { dataProviderSetter.accept((C)componentWrapper.getComponent(), dataProvider); } AvailableValuesAspectDefinition(AvailableValuesType availableValuesType,
            BiConsumer<C, ListDataProvider<Object>> dataProviderSetter); @Override Handler createUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper); Aspect<Collection<?>> createAspect(String propertyName, Class<?> valueClass); static final String NAME; }