-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gRPC - align service names generated by quarkus with grpc-java
- resolves #27170
- Loading branch information
Showing
4 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ions/grpc/protoc/src/test/java/io/quarkus/grpc/protoc/plugin/MutinyGrpcGeneratorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.quarkus.grpc.protoc.plugin; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class MutinyGrpcGeneratorTest { | ||
|
||
@Test | ||
public void testAdaptMethodName() { | ||
assertEquals("sayHello", MutinyGrpcGenerator.adaptMethodName("SayHello")); | ||
assertEquals("sayHello", MutinyGrpcGenerator.adaptMethodName("Say_Hello")); | ||
assertEquals("sayHello", MutinyGrpcGenerator.adaptMethodName("Say_hello")); | ||
assertEquals("sayHelloAndBye", MutinyGrpcGenerator.adaptMethodName("Say_Hello_and_Bye")); | ||
assertEquals("return", MutinyGrpcGenerator.adaptMethodName("return_")); | ||
} | ||
|
||
} |