Search in sources :

Example 6 with CMConfiguration

use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.

the class CMConfigurationTest method testMaxNumberOfPartsZero.

@Test
public void testMaxNumberOfPartsZero() throws Exception {
    final CMConfiguration configuration = new CMConfiguration();
    configuration.setProductToken(UUID.randomUUID().toString());
    configuration.setDefaultFrom("DefaultFrom");
    configuration.setDefaultMaxNumberOfParts(0);
    configuration.setTestConnectionOnStartup(false);
    final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
    Assert.isTrue(1 == constraintViolations.size());
}
Also used : ConstraintViolation(javax.validation.ConstraintViolation) CMConfiguration(org.apache.camel.component.cm.CMConfiguration) Test(org.junit.Test)

Aggregations

ConstraintViolation (javax.validation.ConstraintViolation)6 CMConfiguration (org.apache.camel.component.cm.CMConfiguration)6 Test (org.junit.Test)6