Search in sources :

Example 1 with ManagedItemProvider

use of org.eclipse.smarthome.core.items.ManagedItemProvider in project smarthome by eclipse.

the class ItemResourceOSGiTest method setup.

@Before
public void setup() {
    initMocks(this);
    itemResource = getService(ItemResource.class);
    itemResource.uriInfo = mock(UriInfo.class);
    registerVolatileStorageService();
    managedItemProvider = getService(ManagedItemProvider.class);
    item1 = new SwitchItem(ITEM_NAME1);
    item2 = new SwitchItem(ITEM_NAME2);
    item3 = new DimmerItem(ITEM_NAME3);
    when(itemProvider.getAll()).thenReturn(Arrays.asList(item1, item2, item3));
    registerService(itemProvider);
}
Also used : ManagedItemProvider(org.eclipse.smarthome.core.items.ManagedItemProvider) DimmerItem(org.eclipse.smarthome.core.library.items.DimmerItem) UriInfo(javax.ws.rs.core.UriInfo) SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) Before(org.junit.Before)

Aggregations

UriInfo (javax.ws.rs.core.UriInfo)1 ManagedItemProvider (org.eclipse.smarthome.core.items.ManagedItemProvider)1 DimmerItem (org.eclipse.smarthome.core.library.items.DimmerItem)1 SwitchItem (org.eclipse.smarthome.core.library.items.SwitchItem)1 Before (org.junit.Before)1