Fails if the subject is not OK.
()
| 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) { |
no test coverage detected