]> git.basschouten.com Git - openhab-addons.git/blob
e69ca98070c0de5f8f140e5f215cfc61ca452d4c
[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.nibeheatpump.internal.models;
14
15 import static org.junit.jupiter.api.Assertions.*;
16
17 import org.junit.jupiter.api.BeforeEach;
18 import org.junit.jupiter.api.Test;
19
20 /**
21  * @author Pauli Anttila - Initial contribution
22  */
23 public class VariableInformationTest {
24
25     @BeforeEach
26     public void Before() {
27     }
28
29     @Test
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);
37     }
38
39     @Test
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);
47     }
48
49     @Test
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);
57     }
58
59     @Test
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);
67     }
68 }