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.sensibo.internal;
15 import static org.junit.jupiter.api.Assertions.assertFalse;
16 import static org.junit.jupiter.api.Assertions.assertTrue;
18 import java.io.IOException;
20 import org.junit.jupiter.api.Test;
21 import org.openhab.binding.sensibo.internal.dto.poddetails.PodDetailsDTO;
22 import org.openhab.binding.sensibo.internal.model.SensiboModel;
23 import org.openhab.binding.sensibo.internal.model.SensiboSky;
26 * @author Arne Seime - Initial contribution
29 public class SensiboModelTest {
31 private final WireHelper wireHelper = new WireHelper();
34 public void testCaseInsensitiveMacAddress() throws IOException {
36 final PodDetailsDTO rsp = wireHelper.deSerializeResponse("/get_pod_details_response.json", PodDetailsDTO.class);
37 SensiboSky sky = new SensiboSky(rsp);
39 SensiboModel model = new SensiboModel(0);
42 assertFalse(model.findSensiboSkyByMacAddress("MA:C:AD:DR:ES:XX").isPresent());
43 assertTrue(model.findSensiboSkyByMacAddress("MA:C:AD:DR:ES:S0").isPresent());
44 assertTrue(model.findSensiboSkyByMacAddress("MA:C:AD:DR:ES:S0".toLowerCase()).isPresent());