2 * Copyright (c) 2010-2022 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.util;
15 import static org.junit.jupiter.api.Assertions.assertTrue;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.Test;
19 import org.openhab.binding.mybmw.internal.utils.Converter;
22 * The {@link LocaleTest} is testing locale settings
24 * @author Bernd Weymann - Initial contribution
27 @SuppressWarnings("null")
28 public class LocaleTest {
31 public void testDistance() {
34 double distance = 0.005;
35 double dist = Converter.measureDistance(lat, lon, lat + distance, lon + distance);
36 assertTrue(dist < 1, "Distance below 1 km");