]> git.basschouten.com Git - openhab-addons.git/blob
44a710efc54edf2bfad9876db8abb69bf88fc38e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.StringType;
18
19 /**
20  * Test class for (@link LxControlWebPage}
21  *
22  * @author Pawel Pieczul - initial contribution
23  *
24  */
25 public class LxControlWebPageTest extends LxControlTest {
26     @BeforeEach
27     public void setup() {
28         setupControl("132d2791-00f8-d532-ffff403fb0c34b9e", "0b734138-037d-034e-ffff403fb0c34b9e",
29                 "0fe650c2-0004-d446-ffff504f9410790f", "Webpage 1");
30     }
31
32     @Test
33     public void testControlCreation() {
34         testControlCreation(LxControlWebPage.class, 1, 0, 2, 2, 0);
35     }
36
37     @Test
38     public void testChannels() {
39         testChannel("String", " / URL", null, null, null, null, true, null);
40         testChannel("String", " / URL HD", null, null, null, null, true, null);
41     }
42
43     @Test
44     public void testChannelStates() {
45         testChannelState(" / URL", new StringType("http://low.res"));
46         testChannelState(" / URL HD", new StringType("http://hi.res"));
47     }
48 }