mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Fix build after core changes (#14027)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
bd23bcc87d
commit
598a285adf
@ -107,22 +107,22 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
|
||||
// Then
|
||||
assertThat(actual.size(), is(9));
|
||||
|
||||
assertChannel(actual.get(0), METADATA_GROUP, LAST_RECEIVED, LAST_RECEIVED_DATETIME_CHANNELTYPEUID,
|
||||
ChannelKind.STATE, is("DateTime"));
|
||||
assertChannel(actual.get(1), METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID,
|
||||
assertChannel(actual, METADATA_GROUP, LAST_RECEIVED, LAST_RECEIVED_DATETIME_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("DateTime"));
|
||||
assertChannel(actual, METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID,
|
||||
ChannelKind.TRIGGER, nullValue());
|
||||
assertChannel(actual.get(2), METADATA_GROUP, LAST_QUERY_STATE, LAST_QUERY_STATE_CHANNELTYPEUID,
|
||||
ChannelKind.STATE, is("String"));
|
||||
assertChannel(actual.get(3), METADATA_GROUP, DATEUTC, DATEUTC_CHANNELTYPEUID, ChannelKind.STATE, is("String"));
|
||||
assertChannel(actual.get(4), METADATA_GROUP, REALTIME_FREQUENCY, REALTIME_FREQUENCY_CHANNELTYPEUID,
|
||||
ChannelKind.STATE, is("Number"));
|
||||
assertChannel(actual.get(5), METADATA_GROUP, SOFTWARE_TYPE, SOFTWARETYPE_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
assertChannel(actual, METADATA_GROUP, LAST_QUERY_STATE, LAST_QUERY_STATE_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("String"));
|
||||
assertChannel(actual.get(6), HUMIDITY_GROUP, HUMIDITY, HUMIDITY_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
assertChannel(actual, METADATA_GROUP, DATEUTC, DATEUTC_CHANNELTYPEUID, ChannelKind.STATE, is("String"));
|
||||
assertChannel(actual, METADATA_GROUP, REALTIME_FREQUENCY, REALTIME_FREQUENCY_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("Number"));
|
||||
assertChannel(actual, METADATA_GROUP, SOFTWARE_TYPE, SOFTWARETYPE_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("String"));
|
||||
assertChannel(actual, HUMIDITY_GROUP, HUMIDITY, HUMIDITY_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("Number:Dimensionless"));
|
||||
assertChannel(actual.get(7), WIND_GROUP, WIND_SPEED_AVG_2MIN, WIND_SPEED_AVG_2MIN_CHANNELTYPEUID,
|
||||
ChannelKind.STATE, is("Number:Speed"));
|
||||
assertChannel(actual.get(8), POLLUTION_GROUP, AQ_PM2_5, PM2_5_MASS_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
assertChannel(actual, WIND_GROUP, WIND_SPEED_AVG_2MIN, WIND_SPEED_AVG_2MIN_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("Number:Speed"));
|
||||
assertChannel(actual, POLLUTION_GROUP, AQ_PM2_5, PM2_5_MASS_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("Number:Density"));
|
||||
}
|
||||
|
||||
@ -388,8 +388,8 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
|
||||
|
||||
// Then
|
||||
assertThat(actual.size(), is(8));
|
||||
assertChannel(actual.get(7), METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID,
|
||||
ChannelKind.STATE, is("DateTime"));
|
||||
assertChannel(actual, METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID, ChannelKind.STATE,
|
||||
is("DateTime"));
|
||||
|
||||
// When
|
||||
handler.dispose();
|
||||
@ -414,15 +414,16 @@ class WundergroundUpdateReceiverDiscoveryServiceTest {
|
||||
|
||||
// Then
|
||||
assertThat(actual.size(), is(8));
|
||||
assertChannel(actual.get(7), METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID,
|
||||
assertChannel(actual, METADATA_GROUP, LAST_QUERY_TRIGGER, LAST_QUERY_TRIGGER_CHANNELTYPEUID,
|
||||
ChannelKind.TRIGGER, nullValue());
|
||||
}
|
||||
|
||||
private void assertChannel(Channel actual, String expectedGroup, String expectedName, ChannelTypeUID expectedUid,
|
||||
ChannelKind expectedKind, Matcher<Object> expectedItemType) {
|
||||
private void assertChannel(List<Channel> channels, String expectedGroup, String expectedName,
|
||||
ChannelTypeUID expectedUid, ChannelKind expectedKind, Matcher<Object> expectedItemType) {
|
||||
ChannelUID channelUID = new ChannelUID(TEST_THING_UID, expectedGroup, expectedName);
|
||||
Channel actual = channels.stream().filter(c -> channelUID.equals(c.getUID())).findFirst().orElse(null);
|
||||
assertThat(actual, is(notNullValue()));
|
||||
assertThat(actual.getLabel() + " UID", actual.getUID(),
|
||||
is(new ChannelUID(TEST_THING_UID, expectedGroup, expectedName)));
|
||||
assertThat(actual.getLabel() + " UID", actual.getUID(), is(channelUID));
|
||||
assertThat(actual.getLabel() + " ChannelTypeUID", actual.getChannelTypeUID(), is(expectedUid));
|
||||
assertThat(actual.getLabel() + " Kind", actual.getKind(), is(expectedKind));
|
||||
assertThat(actual.getLabel() + " AcceptedItemType", actual.getAcceptedItemType(), expectedItemType);
|
||||
|
Loading…
Reference in New Issue
Block a user