use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdatePolicyVETOThingONLINE.
@Test
public void testAutoUpdatePolicyVETOThingONLINE() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
setAutoUpdatePolicy(CHANNEL_UID_ONLINE_1, AutoUpdatePolicy.VETO);
aum.receiveCommand(event, item);
assertNothingHappened();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicyThingOFFLINEandThingONLINE.
@Test
public void testAutoUpdateNoPolicyThingOFFLINEandThingONLINE() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_OFFLINE_1));
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
aum.receiveCommand(event, item);
assertChangeStateTo();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicyNoThing.
@Test
public void testAutoUpdateNoPolicyNoThing() {
links.add(new ItemChannelLink(ITEM_NAME, new ChannelUID(new ThingUID("test::missing"), "gone")));
aum.receiveCommand(event, item);
assertKeepCurrentState();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdatePolicyVETObeatsDEFAULT.
@Test
public void testAutoUpdatePolicyVETObeatsDEFAULT() {
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.DEFAULT);
aum.receiveCommand(event, item);
assertNothingHappened();
}
use of org.openhab.core.thing.link.ItemChannelLink in project openhab-core by openhab.
the class AutoUpdateManagerTest method testAutoUpdateNoPolicy.
@Test
public void testAutoUpdateNoPolicy() {
links.add(new ItemChannelLink(ITEM_NAME, CHANNEL_UID_ONLINE_1));
aum.receiveCommand(event, item);
assertChangeStateTo();
}
Aggregations