use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInRollershutterProfileTest method stopShutterMovingDownOnShortPressUp.
@Test
public void stopShutterMovingDownOnShortPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
publisher.popLastCommand();
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("No new state expected", null, publisher.popLastCommand());
waitFor(100);
valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
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 openShutterOnShortButtonPressUp.
@Test
public void openShutterOnShortButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
assertEquals("Update State", UpDownType.UP, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
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 closeShutterOnShortButtonPressDown.
@Test
public void closeShutterOnShortButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
assertEquals("Update State", UpDownType.DOWN, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
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 stopShutterMovingAndStartAgain.
@Test
public void stopShutterMovingAndStartAgain() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", UpDownType.UP, publisher.popLastCommand());
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", UpDownType.UP, publisher.popLastCommand());
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", StopMoveType.STOP, publisher.popLastCommand());
waitFor(100);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
assertEquals("Update State", UpDownType.UP, 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 RockerSwitchInSwitchOnOffProfileTest method setUpDefaultDevice.
@Before
public void setUpDefaultDevice() {
parameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, (String) null);
provider.setParameterAddress(parameterAddress);
provider.setItem(new SwitchItem("dummie"));
provider.setEep(EEPId.EEP_F6_02_01);
binding.addBindingProvider(provider);
}
Aggregations