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

Method isOk

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

Fails if the subject is not OK.

()

Source from the content-addressed store, hash-verified

40
41 /** Fails if the subject is not OK. */
42 public void isOk() {
43 if (actual == null) {
44 failWithActual("expected to be OK but was", "null");
45 } else if (!actual.isOk()) {
46 failWithoutActual(
47 fact("expected to be OK but was", actual.getCode()),
48 fact("description", actual.getDescription()),
49 fact("cause", actual.getCause()));
50 }
51 }
52
53 /** Fails if the subject does not have the given code. */
54 public void hasCode(Status.Code expectedCode) {

Callers 2

resultBuilderMethod · 0.45
errorResultMethod · 0.45

Calls 3

getCodeMethod · 0.80
getCauseMethod · 0.80
getDescriptionMethod · 0.65

Tested by

no test coverage detected