]> git.basschouten.com Git - openhab-addons.git/blob
e0422b7fe711947fd91bf39dda6dba2d766693c1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.mybmw.internal.dto;
14
15 import static org.junit.jupiter.api.Assertions.assertEquals;
16
17 import java.util.List;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.junit.jupiter.api.Test;
21 import org.openhab.binding.mybmw.internal.utils.RemoteServiceUtils;
22 import org.openhab.core.thing.ThingTypeUID;
23 import org.openhab.core.types.CommandOption;
24
25 /**
26  * The {@link VehiclePropertiesTest} tests stored fingerprint responses from BMW API
27  *
28  * @author Bernd Weymann - Initial contribution
29  * @author Martin Grassl - move test to myBMWProxyTest
30  */
31 @NonNullByDefault
32 public class VehiclePropertiesTest {
33
34     @Test
35     public void testChannelUID() {
36         ThingTypeUID thingTypePHEV = new ThingTypeUID("mybmw", "plugin-hybrid-vehicle");
37         assertEquals("plugin-hybrid-vehicle", thingTypePHEV.getId(), "Vehicle Type");
38     }
39
40     @Test
41     public void testRemoteServiceOptions() {
42         String commandReference = "[CommandOption [command=light-flash, label=Flash Lights], CommandOption [command=vehicle-finder, label=Vehicle Finder], CommandOption [command=door-lock, label=Door Lock], CommandOption [command=door-unlock, label=Door Unlock], CommandOption [command=horn-blow, label=Horn Blow], CommandOption [command=climate-now-start, label=Start Climate], CommandOption [command=climate-now-stop, label=Stop Climate], CommandOption [command=charge-now, label=Charge]]";
43         List<CommandOption> l = RemoteServiceUtils.getOptions(true);
44         assertEquals(commandReference, l.toString(), "Commad Options");
45     }
46 }