Fix unit test bugs
This commit is contained in:
parent
2ca5d57f0d
commit
d6e3750657
|
@ -21,7 +21,6 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
|
|||
|
||||
public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
|
||||
assert theDatatype != IResource.class; // shouldn't exist
|
||||
assert theDatatype != IDatatype.class; // should use RuntimeChildAny
|
||||
myDatatype = theDatatype;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,9 @@ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger
|
|||
String expectedPath = StringUtils.join(path, '.');
|
||||
|
||||
ourLog.info("Filling profile for: {} - Path: {}", expectedPath);
|
||||
if (!expectedPath.equals(def.getName())) {
|
||||
String name = def.getName();
|
||||
if (!expectedPath.equals(name)) {
|
||||
path.pollLast();
|
||||
theElement.getDefinition().getNameReference().setValue(def.getName());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ public abstract class RestfulServer extends HttpServlet {
|
|||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.getAuthorName().setValue(getClass().getCanonicalName());
|
||||
bundle.getId().setValue(UUID.randomUUID().toString());
|
||||
bundle.getBundleId().setValue(UUID.randomUUID().toString());
|
||||
bundle.getPublished().setToCurrentTimeInLocalTimeZone();
|
||||
|
||||
for (IResource next : theResult) {
|
||||
|
|
|
@ -126,7 +126,7 @@ public class XmlParserTest {
|
|||
|
||||
BundleEntry entry = bundle.getEntries().get(0);
|
||||
assertEquals("HL7, Inc (FHIR Project)", entry.getAuthorName().getValue());
|
||||
assertEquals("http://hl7.org/fhir/valueset/256a5231-a2bb-49bd-9fea-f349d428b70d", entry.getId().getValue());
|
||||
assertEquals("http://hl7.org/fhir/valueset/256a5231-a2bb-49bd-9fea-f349d428b70d", entry.getEntryId().getValue());
|
||||
|
||||
ValueSet resource = (ValueSet) entry.getResource();
|
||||
assertEquals("LOINC Codes for Cholesterol", resource.getName().getValue());
|
||||
|
|
Loading…
Reference in New Issue