MCPcopy Create free account
hub / github.com/grpc/grpc-java / verifyExceptionMessage

Method verifyExceptionMessage

api/src/test/java/io/grpc/StatusTest.java:33–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 private final Charset ascii = Charset.forName("US-ASCII");
32
33 @Test
34 public void verifyExceptionMessage() {
35 assertEquals("UNKNOWN", Status.UNKNOWN.asRuntimeException().getMessage());
36 assertEquals("CANCELLED: This is a test",
37 Status.CANCELLED.withDescription("This is a test").asRuntimeException().getMessage());
38 assertEquals("UNKNOWN", Status.UNKNOWN.asException().getMessage());
39 assertEquals("CANCELLED: This is a test",
40 Status.CANCELLED.withDescription("This is a test").asException().getMessage());
41 }
42
43 @Test
44 public void impossibleCodeValue() {

Callers

nothing calls this directly

Calls 4

assertEqualsMethod · 0.80
asRuntimeExceptionMethod · 0.80
withDescriptionMethod · 0.80
asExceptionMethod · 0.80

Tested by

no test coverage detected