Fails if the subject does not have the given code.
(Status.Code expectedCode)
| 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 |