use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicyThingOFFLINE.
@Test
public void testAutoUpdateNoPolicyThingOFFLINE() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_OFFLINE_1));
aum.receiveCommand(event, item);
assertKeepCurrentState();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateErrorInvalidatesVETO2.
@Test
public void testAutoUpdateErrorInvalidatesVETO2() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_GONE));
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_1, AutoUpdatePolicy.DEFAULT);
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_GONE, AutoUpdatePolicy.VETO);
aum.receiveCommand(event, item);
assertChangeStateTo();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateErrorInvalidatesVETO.
@Test
public void testAutoUpdateErrorInvalidatesVETO() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_GONE));
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_1, AutoUpdatePolicy.RECOMMEND);
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_GONE, AutoUpdatePolicy.VETO);
aum.receiveCommand(event, item);
assertStateEvent("AFTER", AutoUpdateManager.EVENT_SOURCE);
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicyNoChannel.
@Test
public void testAutoUpdateNoPolicyNoChannel() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_GONE));
aum.receiveCommand(event, item);
assertKeepCurrentState();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdatePolicyVETObeatsRECOMMEND.
@Test
public void testAutoUpdatePolicyVETObeatsRECOMMEND() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_2));
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_1, AutoUpdatePolicy.VETO);
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_2, AutoUpdatePolicy.RECOMMEND);
aum.receiveCommand(event, item);
assertNothingHappened();
}
Aggregations