use of com.google.i18n.phonenumbers.Phonenumber.PhoneNumber in project camel by apache.
the class SMSMessageTest method testE164NoPlusSignedNumberBut00IsInvalid.
@Test
public void testE164NoPlusSignedNumberBut00IsInvalid() throws Exception {
final String phoneNumber = new PhoneNumber().setCountryCodeSource(CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN).setNationalNumber(0034600000000).toString();
final SMSMessage m = new SMSMessage("Hello world!", phoneNumber);
final Set<ConstraintViolation<SMSMessage>> constraintViolations = validator.validate(m);
Assert.isTrue(1 == constraintViolations.size());
}
Aggregations