use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method noProtectionPoolFound.
@Test
public void noProtectionPoolFound() {
final String label = "protectionNeighborhoodLabel";
final ServiceCodeException exception = new ServiceCodeException(API_NO_PLACEMENT_FOUND, "Could not find a Storage pool for Protection VirtualArray: {0}", new Object[] { label });
assertApiNoPlacementFound("Could not find a Storage pool for Protection VirtualArray: " + label, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method invalidTag.
@Test
public void invalidTag() {
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Tag is empty or contains less than 2 characters", null);
assertApiBadParameters("Tag is empty or contains less than 2 characters", exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method noDelete.
@Test
public void noDelete() {
final URI id = createTestId("Volume");
final ServiceCodeException exception = new ServiceCodeException(API_ERROR, "Attempt to delete a protected volume that is not the source volume: {0}", new Object[] { id });
assertApiError("Attempt to delete a protected volume that is not the source volume: " + id, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method IllegalId.
@Test
public void IllegalId() {
final String uri = "uri";
final ServiceCodeException exception = new ServiceCodeException(API_PARAMETER_INVALID, "Illegal URI: {0}", new Object[] { uri });
assertApiBadParameters("Illegal URI: " + uri, exception);
}
use of com.emc.storageos.svcs.errorhandling.resources.ServiceCodeException in project coprhd-controller by CoprHD.
the class ServiceCodeExceptionTest method noPoolFound.
@Test
public void noPoolFound() {
final URI cosId = createTestId("CoS");
final URI neighborhoodId = createTestId("Neighbohood");
final ServiceCodeException exception = new ServiceCodeException(API_NO_PLACEMENT_FOUND, "No matching storage pool found using vpool {0} and VirtualArray {1}", new Object[] { cosId, neighborhoodId });
assertApiNoPlacementFound("No matching storage pool found using vpool " + cosId + " and VirtualArray " + neighborhoodId, exception);
}
Aggregations