File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
main/java/io/avaje/inject/generator
test/java/io/avaje/inject/generator Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,11 @@ String getBuildName() {
61
61
if (Util .isVoid (type )) {
62
62
return "void_" + Util .trimMethod (method );
63
63
} else {
64
+ String trimType = Util .trimMethod (type );
64
65
if (name != null ) {
65
- return shortType + "_" + name ;
66
+ return trimType + "_" + name ;
66
67
} else {
67
- return shortType ;
68
+ return trimType ;
68
69
}
69
70
}
70
71
}
Original file line number Diff line number Diff line change 2
2
3
3
import org .junit .jupiter .api .Test ;
4
4
5
+ import static org .assertj .core .api .Assertions .assertThat ;
5
6
import static org .junit .jupiter .api .Assertions .assertEquals ;
6
7
import static org .junit .jupiter .api .Assertions .assertFalse ;
7
8
import static org .junit .jupiter .api .Assertions .assertNull ;
@@ -52,4 +53,9 @@ public void validImportType_not() {
52
53
assertFalse (Util .validImportType ("Foo" ));
53
54
assertFalse (Util .validImportType ("NoPackage" ));
54
55
}
56
+
57
+ @ Test
58
+ void shortMethod () {
59
+ assertThat (Util .shortMethod ("foo.bar.processMe" )).isEqualTo ("bar.processMe" );
60
+ }
55
61
}
You can’t perform that action at this time.
0 commit comments