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.lcn.internal.subhandler;
15 import static org.mockito.Mockito.verify;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.BeforeEach;
19 import org.junit.jupiter.api.Test;
20 import org.openhab.binding.lcn.internal.common.LcnException;
21 import org.openhab.core.library.types.StringType;
26 * @author Fabian Wolter - Initial contribution
29 public class LcnModuleRvarModeSubHandlerTest extends AbstractTestLcnModuleSubHandler {
30 private @NonNullByDefault({}) LcnModuleRvarModeSubHandler l;
37 l = new LcnModuleRvarModeSubHandler(handler, info);
41 public void testhandleCommand1Cooling() throws LcnException {
42 l.handleCommandString(new StringType("COOLING"), 0);
43 verify(handler).sendPck("REATC");
47 public void testhandleCommand1Heating() throws LcnException {
48 l.handleCommandString(new StringType("HEATING"), 0);
49 verify(handler).sendPck("REATH");
53 public void testhandleCommand2Cooling() throws LcnException {
54 l.handleCommandString(new StringType("COOLING"), 1);
55 verify(handler).sendPck("REBTC");
59 public void testhandleCommand2Heating() throws LcnException {
60 l.handleCommandString(new StringType("HEATING"), 1);
61 verify(handler).sendPck("REBTH");