]> git.basschouten.com Git - openhab-addons.git/blob
717172c5b652a9d3c2820624dc87a4bfbe637a72
[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.bsblan.internal;
14
15 import static org.junit.jupiter.api.Assertions.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.Test;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link BsbLanHandlerFactoryTests} class implements tests
23  * for {@link BsbLanHandlerFactory}.
24  *
25  * @author Peter Schraffl - Initial contribution
26  */
27 @NonNullByDefault
28 public class BsbLanHandlerFactoryTests {
29
30     public static final ThingTypeUID UNKNOWN_THING_TYPE_UID = new ThingTypeUID("bsblan", "unknown");
31
32     /**
33      * Test if factory knows all thing types.
34      */
35     @Test
36     public void supportsThingType() {
37         BsbLanHandlerFactory factory = new BsbLanHandlerFactory();
38         assertFalse(factory.supportsThingType(UNKNOWN_THING_TYPE_UID));
39
40         assertTrue(factory.supportsThingType(BsbLanBindingConstants.THING_TYPE_BRIDGE));
41         assertTrue(factory.supportsThingType(BsbLanBindingConstants.THING_TYPE_PARAMETER));
42     }
43 }