use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method missingOrInvalid.
@Test
public void missingOrInvalid() {
final String fieldName = "fieldName";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Missing or invalid argument: {0}", new Object[] { fieldName });
assertApiBadParameters("Missing or invalid argument: " + fieldName, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method notSupportedVPlex.
@Test
public void notSupportedVPlex() {
final ServiceCodeException exception = new ServiceCodeException(API_METHOD_NOT_SUPPORTED, "Not Supported for VPlex volumes", null);
assertApiMethodNotAllowed("Not Supported for VPlex volumes", exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method endpointNotAdded.
@Test
public void endpointNotAdded() {
final String discoveredEndpoints = "discoveredEndpoints";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Endpoints {0} cannot be added because " + "they were discovered automatically in different transport zones", new Object[] { discoveredEndpoints });
assertApiBadParameters("Endpoints " + discoveredEndpoints + " cannot be added because they were discovered automatically in different transport zones", exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method alreadyContainsZone.
@Test
public void alreadyContainsZone() {
final URI id = createTestId("TransportZone");
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "VirtualArray already contains an IP transport zone: {0}", new Object[] { id });
assertApiBadParameters("VirtualArray already contains an IP transport zone: " + id, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method duplicateNetworkSystem.
@Test
public void duplicateNetworkSystem() {
final String ipAddress = "ip_address";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Duplicate NetworkSystem already exists at IP address: {0}", new Object[] { ipAddress });
assertApiBadParameters("Duplicate NetworkSystem already exists at IP address: " + ipAddress, exception);
}
Aggregations