use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.
the class CMConfigurationTest method testNullProductToken.
// @After
// public void afterTest() {
@Test
public void testNullProductToken() throws Exception {
final CMConfiguration configuration = new CMConfiguration();
// length: 1-11
configuration.setDefaultFrom("DefaultFrom");
configuration.setProductToken(null);
configuration.setDefaultMaxNumberOfParts(8);
configuration.setTestConnectionOnStartup(false);
final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
Assert.isTrue(1 == constraintViolations.size());
}
use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.
the class CMConfigurationTest method testMaxNumberOfParts.
@Test
public void testMaxNumberOfParts() throws Exception {
final CMConfiguration configuration = new CMConfiguration();
configuration.setProductToken(UUID.randomUUID().toString());
configuration.setDefaultFrom("DefaultFrom");
configuration.setDefaultMaxNumberOfParts(9);
configuration.setTestConnectionOnStartup(false);
final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
Assert.isTrue(1 == constraintViolations.size());
}
use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.
the class CMConfigurationTest method testDefaultFromFieldZeroLength.
@Test
public void testDefaultFromFieldZeroLength() throws Exception {
final CMConfiguration configuration = new CMConfiguration();
// length: 1-11
configuration.setDefaultFrom("");
configuration.setProductToken(UUID.randomUUID().toString());
configuration.setDefaultMaxNumberOfParts(8);
configuration.setTestConnectionOnStartup(false);
final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
Assert.isTrue(1 == constraintViolations.size());
}
use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.
the class CMConfigurationTest method testNullDefaultFrom.
@Test
public void testNullDefaultFrom() throws Exception {
final CMConfiguration configuration = new CMConfiguration();
// length: 1-11
configuration.setDefaultFrom(null);
configuration.setProductToken(UUID.randomUUID().toString());
configuration.setDefaultMaxNumberOfParts(8);
configuration.setTestConnectionOnStartup(false);
final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
Assert.isTrue(1 == constraintViolations.size());
}
use of org.apache.camel.component.cm.CMConfiguration in project camel by apache.
the class CMConfigurationTest method testDefaultFromFieldMaxLength.
@Test
public void testDefaultFromFieldMaxLength() throws Exception {
final CMConfiguration configuration = new CMConfiguration();
// length: 1-11
configuration.setDefaultFrom("123456789012");
configuration.setProductToken(UUID.randomUUID().toString());
configuration.setDefaultMaxNumberOfParts(8);
configuration.setTestConnectionOnStartup(false);
final Set<ConstraintViolation<CMConfiguration>> constraintViolations = validator.validate(configuration);
Assert.isTrue(1 == constraintViolations.size());
}
Aggregations