use of org.sagebionetworks.bridge.models.studies.Contact in project BridgeServer2 by Sage-Bionetworks.
the class StudyValidatorTest method stringLengthValidation_contactJurisdiction.
@Test
public void stringLengthValidation_contactJurisdiction() {
study = createStudy();
Contact c1 = createContact();
c1.setJurisdiction(generateStringOfLength(256));
study.setContacts(ImmutableList.of(c1));
assertValidatorMessage(validator, study, CONTACTS_FIELD + "[0]." + JURISDICTION_FIELD, getInvalidStringLengthMessage(255));
}
use of org.sagebionetworks.bridge.models.studies.Contact in project BridgeServer2 by Sage-Bionetworks.
the class StudyValidatorTest method nullContactPhoneOK.
@Test
public void nullContactPhoneOK() {
study = createStudy();
Contact c1 = createContact();
c1.setPhone(null);
study.setContacts(ImmutableList.of(c1));
entityThrowingException(validator, study);
}
use of org.sagebionetworks.bridge.models.studies.Contact in project BridgeServer2 by Sage-Bionetworks.
the class StudyValidatorTest method nullContactEmailOK.
@Test
public void nullContactEmailOK() {
study = createStudy();
Contact c1 = createContact();
c1.setEmail(null);
study.setContacts(ImmutableList.of(c1));
entityThrowingException(validator, study);
}
use of org.sagebionetworks.bridge.models.studies.Contact in project BridgeServer2 by Sage-Bionetworks.
the class StudyValidatorTest method stringLengthValidation_contactCity.
@Test
public void stringLengthValidation_contactCity() {
study = createStudy();
Contact c1 = createContact();
Address a1 = createAddress();
a1.setCity(generateStringOfLength(256));
c1.setAddress(a1);
study.setContacts(ImmutableList.of(c1));
assertValidatorMessage(validator, study, CONTACTS_FIELD + "[0]." + ADDRESS_FIELD + "." + CITY_FIELD, getInvalidStringLengthMessage(255));
}
use of org.sagebionetworks.bridge.models.studies.Contact in project BridgeServer2 by Sage-Bionetworks.
the class StudyValidatorTest method stringLengthValidation_contactStreet.
@Test
public void stringLengthValidation_contactStreet() {
study = createStudy();
Contact c1 = createContact();
Address a1 = createAddress();
a1.setStreet(generateStringOfLength(256));
c1.setAddress(a1);
study.setContacts(ImmutableList.of(c1));
assertValidatorMessage(validator, study, CONTACTS_FIELD + "[0]." + ADDRESS_FIELD + "." + STREET_FIELD, getInvalidStringLengthMessage(255));
}
Aggregations