Fix tests

This commit is contained in:
jamesagnew 2016-04-25 08:01:16 -04:00
parent 3fce4cb087
commit 8b3dd4234c
2 changed files with 3 additions and 2 deletions

View File

@ -290,7 +290,7 @@ public class FhirContext {
if (retVal == null) {
Class<? extends IBaseResource> clazz = myNameToResourceType.get(resourceName.toLowerCase());
if (clazz == null) {
throw new DataFormatException(createUnknownResourceNameError(resourceName, myVersion.getVersion()));
throw new DataFormatException(createUnknownResourceNameError(theResourceName, myVersion.getVersion()));
}
if (IBaseResource.class.isAssignableFrom(clazz)) {
retVal = scanResourceType((Class<? extends IResource>) clazz);

View File

@ -142,13 +142,14 @@ public class BaseResourceReferenceDtTest {
new ResourceReferenceDt("http://foo/123123").loadResource(client);
fail();
} catch (DataFormatException e) {
assertEquals("Unknown resource name \"Foo\" (this name is not known in FHIR version \"DSTU2\")", e.getMessage());
assertEquals("Unknown resource name \"foo\" (this name is not known in FHIR version \"DSTU2\")", e.getMessage());
}
try {
new ResourceReferenceDt("http://foo/Sometype/123123").loadResource(client);
fail();
} catch (DataFormatException e) {
e.printStackTrace();
assertEquals("Unknown resource name \"Sometype\" (this name is not known in FHIR version \"DSTU2\")", e.getMessage());
}