File tree Expand file tree Collapse file tree 2 files changed +34
-33
lines changed
javaagent-tooling/src/test
groovy/io/opentelemetry/javaagent/tooling
java/io/opentelemetry/javaagent/tooling Expand file tree Collapse file tree 2 files changed +34
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright The OpenTelemetry Authors
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ package io .opentelemetry .javaagent .tooling ;
7+
8+ import static org .assertj .core .api .Assertions .assertThat ;
9+
10+ import org .junit .jupiter .api .Test ;
11+
12+ class UtilsTest {
13+
14+ @ Test
15+ void getResourceNameAddsSuffixAndConvertDotsToSlashes () {
16+ String result = Utils .getResourceName ("com.example.Something" );
17+
18+ assertThat (result ).isEqualTo ("com/example/Something.class" );
19+ }
20+
21+ @ Test
22+ void getClassNameConvertsSlashesToDots () {
23+ String result = Utils .getClassName ("com/example/Something" );
24+
25+ assertThat (result ).isEqualTo ("com.example.Something" );
26+ }
27+
28+ @ Test
29+ void getInternalNameConvertsSlashesToDots () {
30+ String result = Utils .getInternalName (UtilsTest .class );
31+
32+ assertThat (result ).isEqualTo ("io/opentelemetry/javaagent/tooling/UtilsTest" );
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments