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.energidataservice.internal.api;
15 import static org.hamcrest.MatcherAssert.assertThat;
16 import static org.hamcrest.Matchers.is;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.junit.jupiter.api.Test;
20 import org.junit.jupiter.api.extension.ExtendWith;
21 import org.mockito.junit.jupiter.MockitoExtension;
24 * Tests for {@link GlobalLocationNumber}.
26 * @author Jacob Laursen - Initial contribution
29 @ExtendWith(MockitoExtension.class)
30 public class GlobalLocationNumberTest {
34 assertThat(GlobalLocationNumber.of("5790000682102").isValid(), is(true));
39 assertThat(GlobalLocationNumber.of("5790000682103").isValid(), is(false));
43 void emptyIsInvalid() {
44 assertThat(GlobalLocationNumber.EMPTY.isValid(), is(false));