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
14 package org.openhab.binding.plugwise.internal;
16 import static org.junit.jupiter.api.Assertions.*;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.junit.jupiter.api.Test;
22 * The {@link PlugwiseUtilsTest} class tests some static string utility methods
24 * @author Leo Siepel - Initial contribution
27 public class PlugwiseUtilsTest {
30 public void upperUnderscoreToLowerCamelBaseTest() {
31 assertEquals("nodelimiterpresent", PlugwiseUtils.upperUnderscoreToLowerCamel("NoDelimiterPresent"));
32 assertEquals("delimiterIsPresent", PlugwiseUtils.upperUnderscoreToLowerCamel("DeliMiter_iS_PreSent"));
33 assertEquals("doubleDelimitersDouble", PlugwiseUtils.upperUnderscoreToLowerCamel("DOUBLE__DELIMITERS__DOUBLE"));
34 assertEquals("helloWorld", PlugwiseUtils.upperUnderscoreToLowerCamel("HELLO_WORLD"));
35 assertEquals("", PlugwiseUtils.upperUnderscoreToLowerCamel(""));
36 assertEquals("", PlugwiseUtils.upperUnderscoreToLowerCamel("_"));