]> git.basschouten.com Git - openhab-addons.git/blob
4397052170fac3957055ca478bb00b41dd1f5fe2
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.loxone.internal.controls;
14
15 import org.junit.jupiter.api.BeforeEach;
16 import org.junit.jupiter.api.Test;
17 import org.openhab.core.library.types.OnOffType;
18
19 /**
20  * Test class for (@link LxControlSauna} - version with door sensor no vaporizer
21  *
22  * @author Pawel Pieczul - initial contribution
23  *
24  */
25 public class LxControlSaunaDoorTest extends LxControlSaunaTest {
26     @Override
27     @BeforeEach
28     public void setup() {
29         setupControl("17452951-02ae-1b6e-ffff266cf17271dc", "0b734138-037d-034e-ffff403fb0c34b9e",
30                 "0fe650c2-0004-d446-ffff504f9410790f", "Sauna Controller No Vaporizer With Door Sensor");
31     }
32
33     @Override
34     @Test
35     public void testControlCreation() {
36         testControlCreation(LxControlSauna.class, 3, 0, 13, 13, 14);
37     }
38
39     @Override
40     @Test
41     public void testChannels() {
42         super.testChannels();
43         testChannel("Switch", DOOR_CLOSED_CHANNEL);
44     }
45
46     @Override
47     @Test
48     public void testDoorClosedChannel() {
49         for (int i = 0; i < 5; i++) {
50             changeLoxoneState("doorclosed", 0.0);
51             testChannelState(DOOR_CLOSED_CHANNEL, OnOffType.OFF);
52             changeLoxoneState("doorclosed", 1.0);
53             testChannelState(DOOR_CLOSED_CHANNEL, OnOffType.ON);
54         }
55     }
56 }