use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testServiceStopTime.
/**
* Test serviceStopTime.
*
* @throws Exception
*/
public void testServiceStopTime() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
Date date = new Date(1, 2, 3, 4, 5, 6);
metadata.setServiceStopTime(date);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", date.getYear(), metadata.getServiceStopTime().getYear());
assertEquals("Output does not match expected", date.getMonth(), metadata.getServiceStopTime().getMonth());
assertEquals("Output does not match expected", date.getDate(), metadata.getServiceStopTime().getDate());
assertEquals("Output does not match expected", date.getHours(), metadata.getServiceStopTime().getHours());
assertEquals("Output does not match expected", date.getMinutes(), metadata.getServiceStopTime().getMinutes());
assertEquals("Output does not match expected", 0, metadata.getServiceStopTime().getSeconds());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testFormatCode_localized.
/**
* Test formatCode_localized.
*
* @throws Exception
*/
public void testFormatCode_localized() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setFormatCode(UUID.randomUUID().toString());
metadata.setFormatCode_localized(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getFormatCode_localized());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testFormatCode.
/**
* Test formatCode.
*
* @throws Exception
*/
public void testFormatCode() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setFormatCode(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getFormatCode());
assertEquals("Output does not match expected", null, metadata.getFormatCode_localized());
metadata.setFormatCode(value, true);
eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getFormatCode());
assertEquals("Output does not match expected", value, metadata.getFormatCode_localized());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testUniqueId.
/**
* Test uniqueId.
*
* @throws Exception
*/
public void testUniqueId() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setUniqueId(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getUniqueId());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testLanguageCode.
/**
* Test languageCode.
*
* @throws Exception
*/
public void testLanguageCode() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setLanguageCode(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getLanguageCode());
}
Aggregations