2 * Copyright (c) 2010-2023 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.mybmw.internal.utils;
15 import static org.junit.jupiter.api.Assertions.assertFalse;
16 import static org.junit.jupiter.api.Assertions.assertTrue;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.junit.jupiter.api.Test;
20 import org.openhab.binding.mybmw.internal.MyBMWBridgeConfiguration;
24 * checks if the configuration checker works fine
26 * @author Bernd Weymann - Initial contribution
27 * @author Martin Grassl - renamed
30 public class MyBMWConfigurationCheckerTest {
32 void testCheckConfiguration() {
33 MyBMWBridgeConfiguration cdc = new MyBMWBridgeConfiguration();
34 assertFalse(MyBMWConfigurationChecker.checkConfiguration(cdc));
36 assertFalse(MyBMWConfigurationChecker.checkConfiguration(cdc));
38 assertFalse(MyBMWConfigurationChecker.checkConfiguration(cdc));
40 assertFalse(MyBMWConfigurationChecker.checkConfiguration(cdc));
41 cdc.region = BimmerConstants.REGION_NORTH_AMERICA;
42 assertTrue(MyBMWConfigurationChecker.checkConfiguration(cdc));
43 cdc.region = BimmerConstants.REGION_ROW;
44 assertTrue(MyBMWConfigurationChecker.checkConfiguration(cdc));
45 cdc.region = BimmerConstants.REGION_CHINA;
46 assertTrue(MyBMWConfigurationChecker.checkConfiguration(cdc));