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