use of com.emc.storageos.model.errorhandling.ServiceErrorRestRep in project coprhd-controller by CoprHD.
the class ServiceErrorFactory method toServiceErrorRestRep.
@Deprecated
public static ServiceErrorRestRep toServiceErrorRestRep(final ServiceCode code, final String details, final Locale locale) {
final ServiceErrorRestRep error = new ServiceErrorRestRep();
error.setCode(code.getCode());
error.setRetryable(code.isRetryable());
error.setCodeDescription(code.getSummary(locale));
error.setDetailedMessage(details);
return error;
}
use of com.emc.storageos.model.errorhandling.ServiceErrorRestRep in project coprhd-controller by CoprHD.
the class ApiTestTenants method validateRoleAssignmentBadRequest.
private void validateRoleAssignmentBadRequest(int expectedStatus, String expectedErrorMsg, ClientResponse actual) {
Assert.assertNotNull(actual);
Assert.assertEquals(expectedStatus, actual.getStatus());
final ServiceErrorRestRep actualErrorMsg = actual.getEntity(ServiceErrorRestRep.class);
Assert.assertTrue(actualErrorMsg.getDetailedMessage().startsWith(expectedErrorMsg));
}
Aggregations