Search in sources :

Example 1 with FirmwareRegistry

use of org.openhab.core.thing.firmware.FirmwareRegistry in project openhab-core by openhab.

the class FirmwareRegistryOSGiTest method setup.

@BeforeEach
public void setup() throws IOException {
    configurationAdmin = getService(ConfigurationAdmin.class);
    assertNotNull(configurationAdmin);
    LocaleProvider localeProvider = getService(LocaleProvider.class);
    assertThat(localeProvider, is(notNullValue()));
    defaultLocale = localeProvider.getLocale();
    new DefaultLocaleSetter(configurationAdmin).setDefaultLocale(Locale.ENGLISH);
    waitForAssert(() -> assertThat(localeProvider.getLocale(), is(Locale.ENGLISH)));
    firmwareRegistry = getService(FirmwareRegistry.class);
    assertThat(firmwareRegistry, is(notNullValue()));
    registerService(basicFirmwareProviderMock);
}
Also used : LocaleProvider(org.openhab.core.i18n.LocaleProvider) DefaultLocaleSetter(org.openhab.core.thing.testutil.i18n.DefaultLocaleSetter) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) FirmwareRegistry(org.openhab.core.thing.firmware.FirmwareRegistry) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)1 LocaleProvider (org.openhab.core.i18n.LocaleProvider)1 FirmwareRegistry (org.openhab.core.thing.firmware.FirmwareRegistry)1 DefaultLocaleSetter (org.openhab.core.thing.testutil.i18n.DefaultLocaleSetter)1 ConfigurationAdmin (org.osgi.service.cm.ConfigurationAdmin)1