Examples of convertToBinding()


Examples of org.openhab.binding.homematic.internal.converter.state.OpenClosedTypeConverter.convertToBinding()

    Assert.assertEquals(true, converter.convertToBinding(OpenClosedType.OPEN, getDatapoint("SENSOR", false)));

    Assert.assertEquals(false,
        converter.convertToBinding(OpenClosedType.CLOSED, getDatapoint("STATE", true, 0, 0, "HM-Sec-SC")));
    Assert.assertEquals(true,
        converter.convertToBinding(OpenClosedType.OPEN, getDatapoint("STATE", false, 0, 0, "HM-Sec-SC")));

    Assert.assertEquals(false,
        converter.convertToBinding(OpenClosedType.CLOSED, getDatapoint("STATE", true, 0, 0, "HM-Sec-SC-2")));
    Assert.assertEquals(true,
        converter.convertToBinding(OpenClosedType.OPEN, getDatapoint("STATE", false, 0, 0, "HM-Sec-SC")));
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.OpenClosedTypeConverter.convertToBinding()

        converter.convertToBinding(OpenClosedType.CLOSED, getDatapoint("STATE", true, 0, 0, "HM-Sec-SC")));
    Assert.assertEquals(true,
        converter.convertToBinding(OpenClosedType.OPEN, getDatapoint("STATE", false, 0, 0, "HM-Sec-SC")));

    Assert.assertEquals(false,
        converter.convertToBinding(OpenClosedType.CLOSED, getDatapoint("STATE", true, 0, 0, "HM-Sec-SC-2")));
    Assert.assertEquals(true,
        converter.convertToBinding(OpenClosedType.OPEN, getDatapoint("STATE", false, 0, 0, "HM-Sec-SC")));

    Assert.assertEquals(false,
        converter.convertToBinding(OpenClosedType.CLOSED, getDatapoint("STATE", true, 0, 0, "ZEL STG RM FFK")));
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.PercentTypeConverter.convertToBinding()

  @Test
  public void testPercentTypeConverterToBinding() throws Exception {
    PercentTypeConverter converter = new PercentTypeConverter();

    Assert.assertEquals(true,
        converter.convertToBinding(new PercentType(100), getDatapoint("PRESS_SHORT", true, 0, 1)));
    Assert.assertEquals(false,
        converter.convertToBinding(new PercentType(0), getDatapoint("PRESS_SHORT", false, 0, 1)));

    Assert.assertEquals(1, converter.convertToBinding(new PercentType(100), getDatapoint("SENSOR", 1, 0, 1)));
    Assert.assertEquals(0, converter.convertToBinding(new PercentType(0), getDatapoint("SENSOR", 0, 0, 1)));
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.StringTypeConverter.convertToBinding()

    Assert.assertEquals(new StringType("one"), converter.convertFromBinding(getValueListVariable(false, "one;two")));

    Assert.assertEquals(new StringType("two"), converter.convertFromBinding(getValueListVariable(true, "one;two")));

    Assert.assertEquals("0",
        converter.convertToBinding(new StringType("0"), getValueListVariable("", "0;10;20;30;40;50")));
    Assert.assertEquals("1",
        converter.convertToBinding(new StringType("10"), getValueListVariable("", "0;10;20;30;40;50")));
    Assert.assertEquals("5",
        converter.convertToBinding(new StringType("50"), getValueListVariable("", "0;10;20;30;40;50")));
    Assert.assertEquals("2",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.