]> git.basschouten.com Git - openhab-addons.git/blob
771e7ac6c590d00d5bb1b8bacc3f5f6a4f435319
[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.lametrictime.internal.api.dto.enums;
14
15 import static org.junit.jupiter.api.Assertions.*;
16
17 import org.junit.jupiter.api.Test;
18
19 /**
20  * icon type test.
21  *
22  * @author Gregory Moyer - Initial contribution
23  */
24 public class IconTypeTest {
25     @Test
26     public void testConversion() {
27         for (IconType value : IconType.values()) {
28             assertEquals(value, IconType.toEnum(value.toRaw()));
29         }
30     }
31
32     @Test
33     public void testInvalidRawValue() {
34         assertNull(IconType.toEnum("invalid raw value"));
35     }
36
37     @Test
38     public void testNullRawValue() {
39         assertNull(IconType.toEnum(null));
40     }
41 }