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

Method hasCode

api/src/testFixtures/java/io/grpc/StatusSubject.java:54–60  ·  view source on GitHub ↗

Fails if the subject does not have the given code.

(Status.Code expectedCode)

Source from the content-addressed store, hash-verified

52
53 /** Fails if the subject does not have the given code. */
54 public void hasCode(Status.Code expectedCode) {
55 if (actual == null) {
56 failWithActual("expected to have code " + expectedCode + " but was", "null");
57 } else {
58 check("getCode()").that(actual.getCode()).isEqualTo(expectedCode);
59 }
60 }
61
62 private static final class Factory implements Subject.Factory<StatusSubject, Status> {
63 @Override

Callers

nothing calls this directly

Calls 2

getCodeMethod · 0.80
checkMethod · 0.65

Tested by

no test coverage detected