Search in sources :

Example 1 with FirmwareRegistry

use of org.eclipse.smarthome.core.thing.firmware.FirmwareRegistry in project smarthome by eclipse.

the class FirmwareRegistryOSGiTest method setup.

@Before
public void setup() throws IOException {
    LocaleProvider localeProvider = getService(LocaleProvider.class);
    assertThat(localeProvider, is(notNullValue()));
    defaultLocale = localeProvider.getLocale();
    new DefaultLocaleSetter(getService(ConfigurationAdmin.class)).setDefaultLocale(Locale.ENGLISH);
    waitForAssert(() -> assertThat(localeProvider.getLocale(), is(Locale.ENGLISH)));
    firmwareRegistry = getService(FirmwareRegistry.class);
    assertThat(firmwareRegistry, is(notNullValue()));
    registerService(basicFirmwareProviderMock);
    thing1 = ThingBuilder.create(THING_TYPE_UID1, THING1_ID).build();
    thing2 = ThingBuilder.create(THING_TYPE_UID1, THING2_ID).build();
    thing3 = ThingBuilder.create(THING_TYPE_UID2, THING3_ID).build();
}
Also used : LocaleProvider(org.eclipse.smarthome.core.i18n.LocaleProvider) DefaultLocaleSetter(org.eclipse.smarthome.core.thing.testutil.i18n.DefaultLocaleSetter) FirmwareRegistry(org.eclipse.smarthome.core.thing.firmware.FirmwareRegistry) Before(org.junit.Before)

Aggregations

LocaleProvider (org.eclipse.smarthome.core.i18n.LocaleProvider)1 FirmwareRegistry (org.eclipse.smarthome.core.thing.firmware.FirmwareRegistry)1 DefaultLocaleSetter (org.eclipse.smarthome.core.thing.testutil.i18n.DefaultLocaleSetter)1 Before (org.junit.Before)1