use of org.orcid.jaxb.model.v3.dev1.common.Iso3166Country in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createAddress.
protected Address createAddress(Visibility v, String sourceId) {
Address a = new Address();
a.setVisibility(v);
Iso3166Country[] all = Iso3166Country.values();
Random r = new Random();
int index = r.nextInt(all.length);
if (index < 0 || index >= all.length) {
index = 0;
}
a.setCountry(new Country(all[index]));
setSource(a, sourceId);
return a;
}
use of org.orcid.jaxb.model.v3.dev1.common.Iso3166Country in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateWork_emptyCountryTest.
@Test(expected = ActivityTypeValidationException.class)
public void validateWork_emptyCountryTest() {
Work work = getWork();
work.getCountry().setValue((Iso3166Country) null);
activityValidator.validateWork(work, null, true, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.common.Iso3166Country in project ORCID-Source by ORCID.
the class AddressManagerTest method getAddress.
private Address getAddress(Iso3166Country country) {
Address address = new Address();
address.setCountry(new Country(country));
address.setVisibility(Visibility.PUBLIC);
return address;
}