]> git.basschouten.com Git - openhab-addons.git/blob
7a55a7993a2ea28c055d4affd965ddcba7888b88
[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.sensibo.internal.dto;
14
15 import static org.junit.jupiter.api.Assertions.*;
16
17 import java.io.IOException;
18
19 import org.junit.jupiter.api.Test;
20 import org.openhab.binding.sensibo.internal.dto.setacstateproperty.SetAcStatePropertyRequest;
21
22 /**
23  * @author Arne Seime - Initial contribution
24  */
25 public class SetAcStatePropertyRequestTest extends AbstractSerializationDeserializationTest {
26
27     @Test
28     public void testSerializeDeserialize() throws IOException {
29         SetAcStatePropertyRequest req = new SetAcStatePropertyRequest("PODID", "targetTemperature", "mode");
30         String serializedJson = wireHelper.serialize(req);
31
32         final SetAcStatePropertyRequest deSerializedRequest = wireHelper.deSerializeFromString(serializedJson,
33                 SetAcStatePropertyRequest.class);
34
35         assertEquals("mode", deSerializedRequest.newValue);
36     }
37 }