use of org.springframework.cloud.servicebroker.exception.ServiceDefinitionPlanDoesNotExistException in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceBrokerExceptionHandlerTest method serviceDefinitionPlanDoesNotExistExceptionWithCustomCode.
@Test
void serviceDefinitionPlanDoesNotExistExceptionWithCustomCode() {
final String errorCode = "error";
ServiceDefinitionPlanDoesNotExistException exception = new ServiceDefinitionPlanDoesNotExistException(errorCode, "service-definition-plan-id");
ErrorMessage errorMessage = exceptionHandler.handleException(exception);
assertThat(errorMessage.getError()).isEqualTo(errorCode);
assertThat(errorMessage.getMessage()).contains("Service Definition Plan does not exist: " + "id=service-definition-plan-id");
}
use of org.springframework.cloud.servicebroker.exception.ServiceDefinitionPlanDoesNotExistException in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceBrokerExceptionHandlerTest method serviceDefinitionPlanDoesNotExistException.
@Test
void serviceDefinitionPlanDoesNotExistException() {
ServiceDefinitionPlanDoesNotExistException exception = new ServiceDefinitionPlanDoesNotExistException("service-definition-plan-id");
ErrorMessage errorMessage = exceptionHandler.handleException(exception);
assertThat(errorMessage.getError()).isNull();
assertThat(errorMessage.getMessage()).contains("Service Definition Plan does not exist: " + "id=service-definition-plan-id");
}
Aggregations