Fix tests
This commit is contained in:
parent
3fce4cb087
commit
8b3dd4234c
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue