use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testAuthorRole.
/**
* Test authorRole.
*
* @throws Exception
*/
public void testAuthorRole() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setAuthorRole(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getAuthorRole());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testClassCode.
/**
* Test classCode.
*
* @throws Exception
*/
public void testClassCode() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setClassCode(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getClassCode());
assertEquals("Output does not match expected", null, metadata.getClassCode_localized());
metadata.setClassCode(value, true);
eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getClassCode());
assertEquals("Output does not match expected", value, metadata.getClassCode_localized());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testPatientId.
/**
* Test patientId.
*
* @throws Exception
*/
public void testPatientId() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setPatientId(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getPatientId());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testServiceStartTime.
/**
* Test serviceStartTime.
*
* @throws Exception
*/
public void testServiceStartTime() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
Date date = new Date(1, 2, 3, 4, 5, 6);
metadata.setServiceStartTime(date);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", date.getYear(), metadata.getServiceStartTime().getYear());
assertEquals("Output does not match expected", date.getMonth(), metadata.getServiceStartTime().getMonth());
assertEquals("Output does not match expected", date.getDate(), metadata.getServiceStartTime().getDate());
assertEquals("Output does not match expected", date.getHours(), metadata.getServiceStartTime().getHours());
assertEquals("Output does not match expected", date.getMinutes(), metadata.getServiceStartTime().getMinutes());
assertEquals("Output does not match expected", 0, metadata.getServiceStartTime().getSeconds());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testConfidentialityCode_localized.
/**
* Test confidentialityCode_localized.
*
* @throws Exception
*/
public void testConfidentialityCode_localized() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setConfidentialityCode(UUID.randomUUID().toString());
metadata.setConfidentialityCode_localized(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getConfidentialityCode_localized());
}
Aggregations