use of org.openhab.core.test.storage.VolatileStorageService in project openhab-core by openhab.
the class ManagedTransformationConfigurationProviderTest method setup.
@BeforeEach
public void setup() {
VolatileStorageService storageService = new VolatileStorageService();
provider = new ManagedTransformationConfigurationProvider(storageService);
provider.addProviderChangeListener(listenerMock);
}
use of org.openhab.core.test.storage.VolatileStorageService in project openhab-core by openhab.
the class ItemRegistryImplTest method beforeEach.
@BeforeEach
public void beforeEach() {
GenericItem cameraItem1 = new SwitchItem(CAMERA_ITEM_NAME1);
GenericItem cameraItem2 = new SwitchItem(CAMERA_ITEM_NAME2);
GenericItem cameraItem3 = new NumberItem(CAMERA_ITEM_NAME3);
GenericItem cameraItem4 = new NumberItem(CAMERA_ITEM_NAME4);
cameraItem1.addTag(CAMERA_TAG);
cameraItem2.addTag(CAMERA_TAG);
cameraItem2.addTag(SENSOR_TAG);
cameraItem3.addTag(CAMERA_TAG);
cameraItem4.addTag(CAMERA_TAG_UPPERCASE);
// setup ManageItemProvider with necessary dependencies:
itemProvider = new ManagedItemProvider(new VolatileStorageService(), new ItemBuilderFactoryImpl(new CoreItemFactory()));
itemProvider.add(new SwitchItem(ITEM_NAME));
itemProvider.add(cameraItem1);
itemProvider.add(cameraItem2);
itemProvider.add(cameraItem3);
itemProvider.add(cameraItem4);
// setup ItemRegistryImpl with necessary dependencies:
itemRegistry = new ItemRegistryImpl(mock(MetadataRegistry.class)) {
{
addProvider(itemProvider);
setManagedProvider(itemProvider);
setEventPublisher(ItemRegistryImplTest.this.eventPublisherMock);
setStateDescriptionService(mock(StateDescriptionService.class));
setUnitProvider(mock(UnitProvider.class));
setItemStateConverter(mock(ItemStateConverter.class));
}
};
}
Aggregations