2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.rfxcom.internal.messages;
15 import static org.openhab.binding.rfxcom.internal.RFXComTestHelper.thingUID;
16 import static org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage.PacketType.CURTAIN1;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.junit.jupiter.api.Test;
20 import org.openhab.binding.rfxcom.internal.RFXComBindingConstants;
21 import org.openhab.binding.rfxcom.internal.RFXComTestHelper;
22 import org.openhab.binding.rfxcom.internal.config.RFXComGenericDeviceConfiguration;
23 import org.openhab.binding.rfxcom.internal.exceptions.RFXComException;
24 import org.openhab.core.library.types.OpenClosedType;
25 import org.openhab.core.thing.ChannelUID;
28 * Test for RFXCom-binding
30 * @author Martin van Wingerden - Initial contribution
33 public class RFXComCurtain1MessageTest {
34 private static ChannelUID shutterChannelUID = new ChannelUID(thingUID, RFXComBindingConstants.CHANNEL_SHUTTER);
35 private static RFXComGenericDeviceConfiguration config = new RFXComGenericDeviceConfiguration();
38 config.deviceId = "1.2";
39 config.subType = RFXComCurtain1Message.SubType.HARRISON.toString();
43 public void checkForSupportTest() throws RFXComException {
44 RFXComMessageFactoryImpl.INSTANCE.createMessage(CURTAIN1, config, shutterChannelUID, OpenClosedType.OPEN);
48 public void basicBoundaryCheck() throws RFXComException {
49 RFXComCurtain1Message message = (RFXComCurtain1Message) RFXComMessageFactoryImpl.INSTANCE
50 .createMessage(CURTAIN1, config, shutterChannelUID, OpenClosedType.OPEN);
52 RFXComTestHelper.basicBoundaryCheck(CURTAIN1, message);
55 // TODO please add tests for real messages