use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testCreationTime.
/**
* Test creationTime.
*
* @throws Exception
*/
public void testCreationTime() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
Date date = new Date(1, 2, 3, 4, 5, 6);
metadata.setCreationTime(date);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", date.getYear(), metadata.getCreationTime().getYear());
assertEquals("Output does not match expected", date.getMonth(), metadata.getCreationTime().getMonth());
assertEquals("Output does not match expected", date.getDate(), metadata.getCreationTime().getDate());
assertEquals("Output does not match expected", 0, metadata.getCreationTime().getHours());
assertEquals("Output does not match expected", 0, metadata.getCreationTime().getMinutes());
assertEquals("Output does not match expected", 0, metadata.getCreationTime().getSeconds());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testLoinc.
/**
* Test loinc.
*
* @throws Exception
*/
public void testLoinc() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setLoinc(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getLoinc());
assertEquals("Output does not match expected", null, metadata.getLoinc_localized());
metadata.setLoinc(value, true);
eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getLoinc());
assertEquals("Output does not match expected", value, metadata.getLoinc_localized());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testLoinc_localized.
/**
* Test loinc_localized.
*
* @throws Exception
*/
public void testLoinc_localized() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setLoinc(UUID.randomUUID().toString());
metadata.setLoinc_localized(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getLoinc_localized());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testURI.
public void testURI() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
String value = "input";
metadata.setURI(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getURI());
}
use of oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType in project nhin-d by DirectProject.
the class DirectDocument2Test method testSize.
/**
* Test size.
*
* @throws Exception
*/
public void testSize() throws Exception {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
Long value = 11L;
metadata.setSize(value);
ExtrinsicObjectType eot = metadata.generateExtrinsicObjectType();
metadata = new DirectDocument2.Metadata();
metadata.setValues(eot);
assertEquals("Output does not match expected", value, metadata.getSize());
}
Aggregations