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.max.internal.message;
15 import static org.junit.jupiter.api.Assertions.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.junit.jupiter.api.Test;
21 * Tests cases for {@link FMessage}.
23 * @author Marcel Verpaalen - Initial contribution
26 public class FMessageTest {
28 public static final String RAW_DATA = "F:nl.ntp.pool.org,ntp.homematic.com";
30 private final FMessage message = new FMessage(RAW_DATA);
33 public void getMessageTypeTest() {
34 MessageType messageType = ((Message) message).getType();
35 assertEquals(MessageType.F, messageType);
39 public void getServer1Test() {
40 String ntpServer1 = message.getNtpServer1();
41 assertEquals("nl.ntp.pool.org", ntpServer1);
45 public void getServer2Test() {
46 String ntpServer1 = message.getNtpServer2();
47 assertEquals("ntp.homematic.com", ntpServer1);