use of org.eclipse.smarthome.core.internal.items.GroupFunctionHelper in project smarthome by eclipse.
the class GroupItemTest method setUp.
@Before
public void setUp() {
initMocks(this);
registerVolatileStorageService();
publisher = event -> events.add(event);
itemRegistry = getService(ItemRegistry.class);
assertNotNull(itemRegistry);
registerService(new EventSubscriber() {
@Override
public void receive(Event event) {
events.add(event);
}
@Override
public Set<String> getSubscribedEventTypes() {
HashSet<String> hs = new HashSet<>();
hs.add(ItemUpdatedEvent.TYPE);
return hs;
}
@Override
public EventFilter getEventFilter() {
return null;
}
});
when(unitProvider.getUnit(Temperature.class)).thenReturn(Units.CELSIUS);
groupFunctionHelper = new GroupFunctionHelper();
itemStateConverter = new ItemStateConverterImpl();
((ItemStateConverterImpl) itemStateConverter).setUnitProvider(unitProvider);
}
Aggregations