use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerSteppingProfileTest method doNothingOnWrongChannel.
@Test
public void doNothingOnWrongChannel() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), "A", Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
assertNull("Update State", publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertNull("Update State", publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInRollershutterProfileTest method stopShutterMovingUpOnShortPressUp.
@Test
public void stopShutterMovingUpOnShortPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
publisher.popLastCommand();
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
assertEquals("No new state expected", null, publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInRollershutterProfileTest method openShutterDuringLongButtonPressUp.
@Test
public void openShutterDuringLongButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
assertEquals("Update State", UpDownType.UP, publisher.popLastCommand());
waitFor(LONG_PRESS_DELAY);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
assertEquals("No new state expected", null, publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInRollershutterProfileTest method stopShutterMovingDownOnShortPressDown.
@Test
public void stopShutterMovingDownOnShortPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
publisher.popLastCommand();
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
assertEquals("No new state expected", null, publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInRollershutterProfileTest method setUpDefaultDevice.
@Before
public void setUpDefaultDevice() {
parameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID));
provider.setParameterAddress(parameterAddress);
provider.setItem(new RollershutterItem("dummie"));
provider.setEep(EEPId.EEP_F6_02_01);
binding.addBindingProvider(provider);
}
Aggregations