2 * Copyright (c) 2010-2024 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.boschshc.internal.services.privacymode;
15 import static org.junit.jupiter.api.Assertions.assertSame;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.Test;
19 import org.openhab.core.library.types.OnOffType;
22 * Unit tests for {@link PrivacyModeState}.
24 * @author David Pace - Initial contribution
28 class PrivacyModeStateTest {
31 void testFromOnOffType() {
32 assertSame(PrivacyModeState.ENABLED, PrivacyModeState.from(OnOffType.ON));
33 assertSame(PrivacyModeState.DISABLED, PrivacyModeState.from(OnOffType.OFF));
37 void testToOnOffType() {
38 assertSame(OnOffType.ON, PrivacyModeState.ENABLED.toOnOffType());
39 assertSame(OnOffType.OFF, PrivacyModeState.DISABLED.toOnOffType());