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