Commit daf78902 authored by Tsvetelina Ivanova's avatar Tsvetelina Ivanova
Browse files

Fix error message

parent f9331ab3
Pipeline #41222 failed with stages
in 34 minutes and 38 seconds
...@@ -62,7 +62,7 @@ public class SchemaResolver { ...@@ -62,7 +62,7 @@ public class SchemaResolver {
if (entry.getValue() == null) { if (entry.getValue() == null) {
if (!definitionMap.containsKey(entry.getKey())) { if (!definitionMap.containsKey(entry.getKey())) {
throw new BadRequestException( throw new BadRequestException(
String.format("Invalid input, %s no definition but provided as reference", entry.getKey())); String.format("Invalid input, no '%s' definition found but provided as a reference", entry.getKey()));
} }
} else { } else {
JSONObject refSchema = new JSONObject(entry.getValue()); JSONObject refSchema = new JSONObject(entry.getValue());
......
...@@ -127,7 +127,7 @@ public class SchemaResolverTest { ...@@ -127,7 +127,7 @@ public class SchemaResolverTest {
Mockito.when(schemaService.getSchema("os:wks:anyCrsFeatureCollection.1.0")).thenReturn(referenceSchema); Mockito.when(schemaService.getSchema("os:wks:anyCrsFeatureCollection.1.0")).thenReturn(referenceSchema);
expectedException.expect(BadRequestException.class); expectedException.expect(BadRequestException.class);
expectedException.expectMessage( expectedException.expectMessage(
"Invalid input, person no definition but provided as reference"); "Invalid input, no 'person' definition found but provided as a reference");
schemaResolver.resolveSchema(originalSchema); schemaResolver.resolveSchema(originalSchema);
fail("Should not succeed"); fail("Should not succeed");
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment