Still working on unit tests
This commit is contained in:
parent
22ff1db183
commit
3005c9a766
|
@ -1732,11 +1732,9 @@ class ParserState<T> {
|
|||
public void enteringNewElement(String theNamespaceUri, String theLocalPart) throws DataFormatException {
|
||||
BaseRuntimeElementDefinition<?> target = myContext.getRuntimeChildUndeclaredExtensionDefinition().getChildByName(theLocalPart);
|
||||
if (target == null) {
|
||||
//FIXME: fix this
|
||||
throw new DataFormatException("Unknown " + theLocalPart + " - Valid names are: " + new TreeSet<String>(myContext.getRuntimeChildUndeclaredExtensionDefinition().getValidChildNames()));
|
||||
// myErrorHandler.unknownElement(null, theLocalPart);
|
||||
// push(new SwallowChildrenWholeState(getPreResourceState()));
|
||||
// return;
|
||||
myErrorHandler.unknownElement(null, theLocalPart);
|
||||
push(new SwallowChildrenWholeState(getPreResourceState()));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (target.getChildType()) {
|
||||
|
|
|
@ -67,9 +67,6 @@ patient.title=classpath:ca/uhn/fhir/narrative/title/Patient.html
|
|||
medicationprescription.class=ca.uhn.fhir.model.dstu.resource.MedicationPrescription
|
||||
medicationprescription.narrative=classpath:ca/uhn/fhir/narrative/MedicationPrescription.html
|
||||
medicationprescription.title=classpath:ca/uhn/fhir/narrative/title/MedicationPrescription.html
|
||||
medicationorder.class=ca.uhn.fhir.model.dstu2.resource.MedicationOrder
|
||||
medicationorder.narrative=classpath:ca/uhn/fhir/narrative/MedicationPrescription.html
|
||||
medicationorder.title=classpath:ca/uhn/fhir/narrative/title/MedicationPrescription.html
|
||||
|
||||
medication.class=ca.uhn.fhir.model.dstu.resource.Medication
|
||||
medication.narrative=classpath:ca/uhn/fhir/narrative/Medication.html
|
||||
|
|
|
@ -520,8 +520,11 @@ public class XmlParserDstu21Test {
|
|||
|
||||
/**
|
||||
* Test for #233
|
||||
*
|
||||
* This was rolled back after a conversation with grahame
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testEncodeAndParseProfiledDatatype() {
|
||||
MedicationOrder mo = new MedicationOrder();
|
||||
mo.addDosageInstruction().getTiming().getRepeat().setBounds(new DurationDt().setCode("code"));
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.Date;
|
|||
|
||||
import org.hamcrest.core.StringContains;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
|
@ -195,6 +196,7 @@ public class DefaultThymeleafNarrativeGeneratorTestDstu2 {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testGenerateMedicationPrescription() {
|
||||
MedicationOrder mp = new MedicationOrder();
|
||||
mp.setId("12345");
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.hamcrest.core.StringContains;
|
|||
import org.hamcrest.text.StringContainsInOrder;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
|
||||
|
@ -581,8 +582,11 @@ public class XmlParserDstu2Test {
|
|||
|
||||
/**
|
||||
* See #216 - Profiled datatypes should use their unprofiled parent type as the choice[x] name
|
||||
*
|
||||
* Disabled because we reverted this change after a conversation with Grahame
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testEncodeAndParseProfiledDatatypeChoice() throws Exception {
|
||||
IParser xmlParser = ourCtx.newXmlParser();
|
||||
|
||||
|
|
|
@ -1143,7 +1143,7 @@ public class GenericClientDstu2Test {
|
|||
|
||||
assertEquals("http://example.com/fhir/Patient/1/$validate-code", capt.getAllValues().get(idx).getURI().toASCIIString());
|
||||
ourLog.info(extractBody(capt, idx));
|
||||
assertEquals("<Parameters xmlns=\"http://hl7.org/fhir\"><parameter><name value=\"code\"/><valueString value=\"8495-4\"/></parameter><parameter><name value=\"system\"/><valueUri value=\"http://loinc.org\"/></parameter></Parameters>",extractBody(capt, idx));
|
||||
assertEquals("<Parameters xmlns=\"http://hl7.org/fhir\"><parameter><name value=\"code\"/><valueCode value=\"8495-4\"/></parameter><parameter><name value=\"system\"/><valueUri value=\"http://loinc.org\"/></parameter></Parameters>",extractBody(capt, idx));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.19</version>
|
||||
<configuration>
|
||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
<runOrder>random</runOrder>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
<reuseForks>false</reuseForks>
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.hamcrest.core.IsNot;
|
|||
import org.hamcrest.core.StringContains;
|
||||
import org.hamcrest.text.StringContainsInOrder;
|
||||
import org.hl7.fhir.instance.model.Address;
|
||||
import org.hl7.fhir.instance.model.Attachment;
|
||||
import org.hl7.fhir.instance.model.Address.AddressUse;
|
||||
import org.hl7.fhir.instance.model.Address.AddressUseEnumFactory;
|
||||
import org.hl7.fhir.instance.model.Binary;
|
||||
|
@ -49,7 +48,6 @@ import org.hl7.fhir.instance.model.Identifier.IdentifierUse;
|
|||
import org.hl7.fhir.instance.model.InstantType;
|
||||
import org.hl7.fhir.instance.model.MedicationStatement;
|
||||
import org.hl7.fhir.instance.model.Narrative.NarrativeStatus;
|
||||
import org.hl7.fhir.instance.model.annotations.Child;
|
||||
import org.hl7.fhir.instance.model.Observation;
|
||||
import org.hl7.fhir.instance.model.Organization;
|
||||
import org.hl7.fhir.instance.model.Patient;
|
||||
|
@ -62,6 +60,7 @@ import org.hl7.fhir.instance.model.StringType;
|
|||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
|
@ -91,8 +90,11 @@ public class XmlParserHl7OrgDstu2Test {
|
|||
|
||||
/**
|
||||
* See #216 - Profiled datatypes should use their unprofiled parent type as the choice[x] name
|
||||
*
|
||||
* Disabled after conversation with Grahame
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testEncodeAndParseProfiledDatatypeChoice() throws Exception {
|
||||
IParser xmlParser = ourCtx.newXmlParser();
|
||||
|
||||
|
|
Loading…
Reference in New Issue