]> git.basschouten.com Git - openhab-addons.git/blob
798e9b15cd1832e688d72582bba6f203ec1dbde2
[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.onewire.device;
14
15 import static org.openhab.binding.onewire.internal.OwBindingConstants.THING_TYPE_BASIC;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.BeforeEach;
19 import org.junit.jupiter.api.Test;
20 import org.openhab.binding.onewire.internal.OwException;
21 import org.openhab.binding.onewire.internal.device.DS2401;
22 import org.openhab.core.library.types.OnOffType;
23
24 /**
25  * Tests cases for {@link DS2401}.
26  *
27  * @author Jan N. Klug - Initial contribution
28  */
29 @NonNullByDefault
30 public class DS2401Test extends DeviceTestParent<DS2401> {
31
32     @BeforeEach
33     public void setupMocks() {
34         setupMocks(THING_TYPE_BASIC, DS2401.class);
35     }
36
37     @Test
38     public void presenceTestOn() throws OwException {
39         presenceTest(OnOffType.ON);
40     }
41
42     @Test
43     public void presenceTestOff() throws OwException {
44         presenceTest(OnOffType.OFF);
45     }
46 }