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.nibeheatpump.internal.models;
15 import static org.junit.jupiter.api.Assertions.*;
17 import org.junit.jupiter.api.BeforeEach;
18 import org.junit.jupiter.api.Test;
21 * @author Pauli Anttila - Initial contribution
23 public class VariableInformationTest {
26 public void Before() {
30 public void TestF1X45Variable() {
31 final int coilAddress = 40004;
32 final VariableInformation variableInfo = VariableInformation.getVariableInfo(PumpModel.F1X45, coilAddress);
33 assertEquals(10, variableInfo.factor);
34 assertEquals("BT1 Outdoor temp", variableInfo.variable);
35 assertEquals(VariableInformation.NibeDataType.S16, variableInfo.dataType);
36 assertEquals(VariableInformation.Type.SENSOR, variableInfo.type);
40 public void TestF1X55Variable() {
41 final int coilAddress = 40004;
42 final VariableInformation variableInfo = VariableInformation.getVariableInfo(PumpModel.F1X55, coilAddress);
43 assertEquals(10, variableInfo.factor);
44 assertEquals("BT1 Outdoor Temperature", variableInfo.variable);
45 assertEquals(VariableInformation.NibeDataType.S16, variableInfo.dataType);
46 assertEquals(VariableInformation.Type.SENSOR, variableInfo.type);
50 public void TestF750Variable() {
51 final int coilAddress = 40004;
52 final VariableInformation variableInfo = VariableInformation.getVariableInfo(PumpModel.F750, coilAddress);
53 assertEquals(10, variableInfo.factor);
54 assertEquals("BT1 Outdoor Temperature", variableInfo.variable);
55 assertEquals(VariableInformation.NibeDataType.S16, variableInfo.dataType);
56 assertEquals(VariableInformation.Type.SENSOR, variableInfo.type);
60 public void TestF470Variable() {
61 final int coilAddress = 40020;
62 final VariableInformation variableInfo = VariableInformation.getVariableInfo(PumpModel.F470, coilAddress);
63 assertEquals(10, variableInfo.factor);
64 assertEquals("EB100-BT16 Evaporator temp", variableInfo.variable);
65 assertEquals(VariableInformation.NibeDataType.S16, variableInfo.dataType);
66 assertEquals(VariableInformation.Type.SENSOR, variableInfo.type);