use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.
the class RegistryPackageTypeHelperTest method testGetAssociationsFromRegistryObjectList.
@Test
public void testGetAssociationsFromRegistryObjectList() throws Exception {
RegistryObjectListType registryObjectList = ((RegistryPackageType) registryObject).getRegistryObjectList();
List<AssociationType1> associations = rptHelper.getAssociations(registryObjectList);
assertAssociations(associations);
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.
the class RegistryPackageTypeHelperTest method assertAssociations.
private void assertAssociations(List<AssociationType1> associations) {
// Values from xml file
int expectedSize = 13;
String expectedId = "urn:association:1";
String expectedAssociationType = "RelatedTo";
String expectedSourceObject = "urn:registry:node";
String expectedTargetObject = "urn:contact:id0";
assertThat(associations, hasSize(expectedSize));
AssociationType1 association = associations.get(0);
assertThat(association.isSetId(), is(true));
assertThat(association.getId(), is(equalTo(expectedId)));
assertThat(association.isSetAssociationType(), is(true));
assertThat(association.getAssociationType(), is(equalTo(expectedAssociationType)));
assertThat(association.isSetSourceObject(), is(true));
assertThat(association.getSourceObject(), is(equalTo(expectedSourceObject)));
assertThat(association.isSetTargetObject(), is(true));
assertThat(association.getTargetObject(), is(equalTo(expectedTargetObject)));
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.
the class RegistryPackageWebConverterTest method getThirdAssociation.
private AssociationType1 getThirdAssociation() {
AssociationType1 association = RIM_FACTORY.createAssociationType1();
association.setId("urn:association:3");
association.setAssociationType("RelatedTo");
association.setSourceObject("urn:contact:person1");
association.setTargetObject("urn:content:collection:id0");
return association;
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.
the class RegistryPackageWebConverterTest method getFirstAssociation.
private AssociationType1 getFirstAssociation() {
AssociationType1 association = RIM_FACTORY.createAssociationType1();
association.setId("urn:association:1");
association.setAssociationType("RelatedTo");
association.setSourceObject("urn:registry:node");
association.setTargetObject("urn:contact:id0");
return association;
}
Aggregations