use of org.openhab.binding.lightwaverf.internal.command.LightwaveRFCommand in project openhab1-addons by openhab.
the class LightwaverfConvertorTest method testConvertToLightwaveRfMessageOnCommand.
@Test
public void testConvertToLightwaveRfMessageOnCommand() throws Exception {
LightwaverfConvertor convertor = new LightwaverfConvertor();
LightwaveRFCommand command = convertor.convertToLightwaveRfMessage("2", "3", LightwaveRfType.SWITCH, OnOffType.ON);
LightwaveRFCommand expected = new LightwaveRfOnOffCommand("200,!R2D3F1");
assertEquals(expected.getLightwaveRfCommandString(), command.getLightwaveRfCommandString());
}
use of org.openhab.binding.lightwaverf.internal.command.LightwaveRFCommand in project openhab1-addons by openhab.
the class LightwaverfConvertorTest method testConvertFromLightwaveRfMessageOnCommand.
@Test
public void testConvertFromLightwaveRfMessageOnCommand() throws Exception {
LightwaverfConvertor convertor = new LightwaverfConvertor();
LightwaveRFCommand command = convertor.convertFromLightwaveRfMessage("010,!R2D3F1");
LightwaveRFCommand expected = new LightwaveRfOnOffCommand(10, "2", "3", true);
assertEquals(expected, command);
}
use of org.openhab.binding.lightwaverf.internal.command.LightwaveRFCommand in project openhab1-addons by openhab.
the class LightwaverfConvertorTest method testConvertToLightwaveRfMessageDimCommand.
@Test
public void testConvertToLightwaveRfMessageDimCommand() throws Exception {
LightwaverfConvertor convertor = new LightwaverfConvertor();
LightwaveRFCommand command = convertor.convertToLightwaveRfMessage("2", "3", LightwaveRfType.DIMMER, new PercentType(75));
LightwaveRFCommand expected = new LightwaveRfDimCommand("200,!R2D3FdP24");
assertEquals(expected.getLightwaveRfCommandString(), command.getLightwaveRfCommandString());
}
Aggregations