Simple unit tests for some JavaUtils methods

This commit is contained in:
aboyko
2024-12-06 14:18:06 -05:00
parent f53f1d70d2
commit f6098c38d4

View File

@@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (c) 2024 Broadcom, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Broadcom, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.ide.vscode.commons.java;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class JavaUtilsTest {
@Test
void toBindingKey() {
assertEquals("org.foo.bar.A", JavaUtils.typeBindingKeyToFqName("Lorg/foo/bar/A;"));
}
@Test
void toFqn() {
assertEquals("Lorg/foo/bar/A;", JavaUtils.typeFqNameToBindingKey("org.foo.bar.A"));
}
}