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.loxone.internal.controls;
17 import org.junit.jupiter.api.BeforeEach;
18 import org.junit.jupiter.api.Test;
19 import org.openhab.core.library.types.DecimalType;
20 import org.openhab.core.library.types.OnOffType;
21 import org.openhab.core.library.types.StringType;
24 * Test class for (@link LxControlPushbutton}
26 * @author Pawel Pieczul - initial contribution
29 public class LxControlPushbuttonTest extends LxControlSwitchTest {
33 setupControl("0e3684cc-026e-28e0-ffff403fb0c34b9e", "0b734138-038c-035e-ffff403fb0c34b9e",
34 "0b734138-033e-02d8-ffff403fb0c34b9e", "Kitchen All Blinds Up");
39 public void testControlCreation() {
40 testControlCreation(LxControlPushbutton.class, 1, 0, 1, 1, 1);
45 public void testChannels() {
46 testChannel("Switch", Set.of("Switchable"));
51 public void testCommands() {
52 for (int i = 0; i < 100; i++) {
53 executeCommand(OnOffType.ON);
55 executeCommand(DecimalType.ZERO);
57 executeCommand(OnOffType.OFF);
59 executeCommand(StringType.EMPTY);