use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateErrorInvalidatesDEFAULT.
@Test
public void testAutoUpdateErrorInvalidatesDEFAULT() {
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.DEFAULT);
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 testAutoUpdatePolicyDEFAULTbeatsRECOMMEND.
@Test
public void testAutoUpdatePolicyDEFAULTbeatsRECOMMEND() {
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.DEFAULT);
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_2, AutoUpdatePolicy.RECOMMEND);
aum.receiveCommand(event, item);
assertChangeStateTo();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdatePolicyRECOMMEND.
@Test
public void testAutoUpdatePolicyRECOMMEND() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_1, AutoUpdatePolicy.RECOMMEND);
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 testAutoUpdateNoPolicyNoHandler.
@Test
public void testAutoUpdateNoPolicyNoHandler() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_HANDLER_MISSING));
aum.receiveCommand(event, item);
assertKeepCurrentState();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicyThingONLINEandThingOFFLINE.
@Test
public void testAutoUpdateNoPolicyThingONLINEandThingOFFLINE() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_OFFLINE_1));
aum.receiveCommand(event, item);
assertChangeStateTo();
}
Aggregations