use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method unableToCreateMashaller.
@Test
public void unableToCreateMashaller() {
final String type = "type";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Unable to create a mashaller for mediatype: {0}", new Object[] { type });
assertApiBadParameters("Unable to create a mashaller for mediatype: " + type, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method invalidInput.
@Test
public void invalidInput() {
final int lineNumber = 10;
final int columnNumber = 5;
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Invalid input at line {0}, column {1}", new Object[] { lineNumber, columnNumber });
assertApiBadParameters("Invalid input at line " + lineNumber + ", column " + columnNumber, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method noPoolFoundException.
@Test
public void noPoolFoundException() {
final Exception e = createException();
final URI cosId = createTestId("CoS");
final URI neighborhoodId = createTestId("Neighbohood");
final ServiceCodeException exception = new ServiceCodeException(API_NO_PLACEMENT_FOUND, e, "No matching storage pool found using vpool {0} and VirtualArray {1}. Caused by: {2}", new Object[] { cosId, neighborhoodId, e.getMessage() });
assertApiNoPlacementFound("No matching storage pool found using vpool " + cosId + " and VirtualArray " + neighborhoodId + ". Caused by: " + EXCEPTION_MESSAGE, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method invalidRole.
@Test
public void invalidRole() {
final String role = "role";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "invalid role: {0}", new Object[] { role });
assertApiBadParameters("invalid role: " + role, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method keypoolNotFound.
@Test
public void keypoolNotFound() {
final String keyPath = "keyPool/RelativePath";
final String key = "key";
final ServiceCodeException exception = new ServiceCodeException(IO_ERROR, "Not found, key pool: {0}, key {1}", new Object[] { keyPath, key });
assertIoError("Not found, key pool: " + keyPath + ", key " + key, exception);
}
Aggregations