Merge branch 'master' of github.com:jamesagnew/hapi-fhir

This commit is contained in:
James Agnew 2016-06-24 18:40:58 -04:00
commit 21ea81dd7f
3 changed files with 22 additions and 5 deletions

View File

@ -132,10 +132,10 @@
<configuration>
<instructions>
<!--<Export-Package>ca.uhn.fhir</Export-Package> <Export-Package>org.hl7.fhir</Export-Package> -->
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<!--<Embed-Dependency>*;scope=!provided|test</Embed-Dependency> <Embed-Directory>lib</Embed-Directory> <Embed-Transitive>true</Embed-Transitive> -->
<_nouses>true</_nouses>
<_removeheaders>Built-By, Include-Resource, Private-Package</_removeheaders>
<_removeheaders>Built-By, Include-Resource, Private-Package, Require-Capability</_removeheaders>
<!-- <Private-Package>org.foo.myproject.*</Private-Package> <Bundle-Activator>org.foo.myproject.impl1.Activator</Bundle-Activator> -->
<!-- <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=hapi-fhir-*</Embed-Dependency> -->
<Import-Package>
@ -146,6 +146,7 @@
com.google.*;resolution:=optional;-remove-attribute:=version,
com.phloc.commons;resolution:=optional;-remove-attribute:=version,
com.phloc.*;resolution:=optional;-remove-attribute:=version,
javassist;-remove-attribute:=version,
javax.*;-remove-attribute:=version,
net.sf.saxon;resolution:=optional,
org.apache.commons.*;-remove-attribute:=version,

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.osgi.impl;
package ca.uhn.fhir.osgi;
/*
* #%L
@ -31,8 +31,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.osgi.FhirConfigurationException;
import ca.uhn.fhir.osgi.FhirServer;
import ca.uhn.fhir.rest.server.RestfulServer;
/**

View File

@ -92,6 +92,24 @@ public class JsonParserDstu2Test {
assertThat(output, containsString("\"div\":\"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">VALUE</div>\""));
}
/**
* See #390
*/
@Test
public void testEncodeAndParseBundleWithNoEntries() {
ca.uhn.fhir.model.dstu2.resource.Bundle b = new ca.uhn.fhir.model.dstu2.resource.Bundle();
b.setId("123");
String encoded = ourCtx.newJsonParser().encodeResourceToString(b);
ourLog.info(encoded);
assertThat(encoded, containsString("123"));
assertThat(encoded, not(containsString("entry")));
b = ourCtx.newJsonParser().parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, encoded);
assertEquals("123", b.getId().getIdPart());
assertEquals(0, b.getEntry().size());
}
@Test
public void testEncodeNarrativeShouldIncludeNamespaceWithProcessingInstruction() {