use of org.apache.camel.model.OnExceptionDefinition in project camel by apache.
the class DefaultExceptionPolicyStrategyTest method testDirectMatch1.
public void testDirectMatch1() {
setupPolicies();
OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new CamelExchangeException("", null));
assertEquals(type1, result);
}
use of org.apache.camel.model.OnExceptionDefinition in project camel by apache.
the class DefaultExceptionPolicyStrategyTest method testNoMatch1ThenNull.
public void testNoMatch1ThenNull() {
setupPoliciesNoTopLevelException();
OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
assertNull("Should not find an exception policy to use", result);
}
use of org.apache.camel.model.OnExceptionDefinition in project camel by apache.
the class DefaultExceptionPolicyStrategyTest method testClosetMatch1.
public void testClosetMatch1() {
setupPolicies();
OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ValidationException(null, ""));
assertEquals(type1, result);
result = strategy.getExceptionPolicy(policies, null, new ExchangeTimedOutException(null, 0));
assertEquals(type1, result);
}
use of org.apache.camel.model.OnExceptionDefinition in project camel by apache.
the class DefaultExceptionPolicyStrategyTest method testDirectMatch3.
public void testDirectMatch3() {
setupPolicies();
OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new IOException(""));
assertEquals(type3, result);
}
use of org.apache.camel.model.OnExceptionDefinition in project camel by apache.
the class DefaultExceptionPolicyStrategyTest method testNoMatch1ThenMatchingJustException.
public void testNoMatch1ThenMatchingJustException() {
setupPolicies();
OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
assertEquals(type2, result);
}
Aggregations